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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Query results

Author  Topic 

sardinka
Posting Yak Master

142 Posts

Posted - 2005-07-19 : 09:47:59
I have the following query results:
20050705 Accepted # 1
20050705 Failed # 1
20050613 Failed # 1
20050519 Accepted # 1
how do I do this:
20050705 Accepted Failed
20050705 # 1 # 1
20050613 # 1 # 1
20050519 # 1 # 1

Thrasymachus
Constraint Violating Yak Guru

483 Posts

Posted - 2005-07-19 : 09:50:09
And what is the problem.

Post the data definition language of the tables, the SQL for the query and the antcipated results with some explanation of what is wrong. Otherwise you will be ignored.

Sean Roussy

Please backup all of your databases including master, msdb and model on a regular basis. I am tired of telling people they are screwed. The job you save may be your own.

I am available for consulting work. Just email me through the forum.
Go to Top of Page

gpl
Posting Yak Master

195 Posts

Posted - 2005-07-19 : 13:09:29
What you want is a Cross Tab query -- do a search on this site, there are some very good articles

Graham
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-07-20 : 01:22:07
Refer this
http://sqlteam.com/searchresults.asp?SearchTerms=pivot

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -