Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
sanjay5219
Posting Yak Master
240 Posts |
Posted - 2010-10-11 : 12:20:07
|
| Dear All,I have two table Test1 and Test2Test1 : Row_DateEmployee_IDAmountTest2 : Row_DateEmployee_IDAmountNow i have to display a report like thisRow_Date,Total_Rows_In_Test1,Sum of Amount in Test1,Total_Rows_In_Test2,Sum of Amount in Test2Please help me |
|
|
slimt_slimt
Aged Yak Warrior
746 Posts |
Posted - 2010-10-11 : 12:35:48
|
| do you have two same tables?shouldn't you have one table with following structure:test:test_number,row_Date,Employee_ID,Amountwhat do you want to show in this report? |
 |
|
|
sanjay5219
Posting Yak Master
240 Posts |
Posted - 2010-10-11 : 12:39:46
|
| Actually first table is Temp Table and it will always have value for one date and another table is main table |
 |
|
|
slimt_slimt
Aged Yak Warrior
746 Posts |
Posted - 2010-10-11 : 12:45:53
|
| so table test1 is a single row table and test2 is main table. and you join both on all three columns? |
 |
|
|
sanjay5219
Posting Yak Master
240 Posts |
Posted - 2010-10-11 : 13:15:22
|
| yes |
 |
|
|
|
|
|