I am trying to SUM a column from each of 3 tables, where an ID field is the same in each table and the date range is the same also
It would look something like this:
table1 table2 table3 table4
amt amt amt t4ID
ID ID ID
date date date
WHERE (each table).ID = @t4ID
AND (each table).date BETWEEN @date1 AND @date2
the t4ID, date1 and date2 will be chosen by the user from controls and supplied to the statement via a parameter array.
I have tried many variations ( with more to go) to send 1 @t4ID parameter, for example, and use that in all 3 tables (same with the dates).
Any help to nudge me in the right direction would be appreciated.
View Complete Post