I have two tables:
tInv containing invoices. The fields I am interested in:
cusid ' customer id
source ' invoice#
dtjournal ' invoice date
And tSal containing orders (not billed/shipped yet) with the fields:
cusid ' customerid
salnr ' sales order number
dtsalordr ' sales order date
I need to query these two tables and return a single table ordered by date, containing:
id,cusid,number,date,type ('in' or 'so')
In other words I need to select id and cusid from both tables and dtjournal and dtsalordr from either table and combine into one column 'date' and get source & salnr and combine into 'number'
I want a list, ordered by date, of all invoices & orders.
Is this a possibility with a SELECT statement or do I need to fetch both tables, and then manually move the rows into a new table?
View Complete Post