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 |
kaus
Posting Yak Master
179 Posts |
Posted - 2004-04-21 : 17:35:59
|
I've got two tables as shown below and want the output as shown below -- is there a way to do this just using SQL ?? I got it with VBA but would be very interested in learning a way with just SQL -- this stuff comes up a lotThanksBOD_TSS TableSiteNo Sample_Date BOD TSS1 1/5/1999 360 3601 1/15/1999 270 4501 1/23/1999 350 4992 1/6/1999 340 5002 1/7/1999 340 500MG TableSiteNo Month MG1 1/1/1999 8902 1/1/1999 670Format wanted:SiteNo Sample_Date BOD TSS Month MG1 1/5/1999 360 360 1/1/1999 8901 1/15/1999 270 4501 1/23/1999 350 4992 1/6/1999 340 500 1/1/1999 6702 1/7/1999 340 500 |
|
X002548
Not Just a Number
15586 Posts |
Posted - 2004-04-23 : 12:01:59
|
There doesn't seem to be a relationship between the rows...It seems arbitrary...What rules do you use to slam them together?Brett8-) |
 |
|
kaus
Posting Yak Master
179 Posts |
Posted - 2004-04-23 : 19:25:25
|
I grouped them by month-year and site |
 |
|
|
|
|