I am working on creating a report based query. In which I get data from, Invoice, InvoiceDetails table. Invoice table includes sales invoice, credit memo, and i get some of the details from INVENTORYHISTORY table also. and that table includes sales
invoice details and credit memo details and also work order details (invoice table does not include work order details). so I'm trying to join all the table in one query. and I'm doing that because i've started with that path.
but now i'm thinking to do all different query and union them all.
does it sound like a correct way?
Please suggest me some path. i'm new and i haven't done it before. but it seems like i'll be working on this for long time. so all your suggestions are welcome.
T-SQL i'm writing is really complicated for individual ones. so if i write 3 separate queries, and union themn, it will be big sql.
and there are not 100% normalize data.
View Complete Post