Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CrossTab Statement in transact-SQL????

Status
Not open for further replies.

zishan619

Programmer
May 28, 2003
284
MX
Hi I was wondering if someone can help me with this thought process.
I have a strSQL which would create something like this:
Analyst Manager CCNum Total_Hours Category date
ABC CBS 1867 5 System Down 01/01/04
and so on...

I need it to list out something like this:
Analyst Mananger CCNum Category Category Category Date
The hours would fill out under the category.

I was thinking can I take my strSQL statement and use it in a different sql statement let say strZ to make a crosstab query.

Is this possible? Also, I think I can't do a CASE ELSE statement because each CCNUM has different categories associated with them. I do have them in a table specified.

Thank you
Z
 
here is a post with some things that helped me do crosstab in SQL.

thread183-451930
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top