June 12, 2007 at 10:35 am
id lname fname date amt
===================================================
100604057 Bethel Abodeely 2006-09-30 00:00:00.000 5.1000
100604057 Bethel Abodeely 2006-09-30 00:00:00.000 5.0900
100604057 Bethel Abodeely 2007-03-31 00:00:00.000 35.6600
100604057 Bethel Abodeely 2007-03-31 00:00:00.000 35.6700
I need help on how to write this query so that above example can have
different columns for date and amount instead of different rows as it is now... Number of rows can be of any number based on how many times the individuals have contributed. Thanks in advance for assistance.
June 12, 2007 at 1:11 pm
It sounds like you are looking for a Pivot Table solution. Perform a search on pivot tables in the TSQL (2k & 2k5) areas. You should find LOTS of examples.
June 12, 2007 at 2:50 pm
http://qa.sqlservercentral.com/forums/shwmessage.aspx?forumid=338&messageid=371677
Check that thread out, might give you some ideas.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply