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
 Transact-SQL (2000)
 Return Value

Author  Topic 

ladiaocb
Yak Posting Veteran

57 Posts

Posted - 2008-08-26 : 11:49:03
Hey guys I need help with a query. I have the following table

TBL1

eid-------userid-------edatetime------escore
1---------30-----------8/1/2008-------100
2---------30-----------8/6/2008-------95
3---------30-----------8/2/2008-------97
4---------30-----------8/15/2008------88

I am trying to return a result that displays the scores and dates on a single row:

userid---1stScore---1stdate-----2ndScore---2ndScoreDate-----
30-------100--------8/1/2008----97---------8/2/2008---

As always any help is greatly appreciated!

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2008-08-26 : 11:57:09
search for PIVOT or CROSS TAB in this forum. Lots of example there


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

ladiaocb
Yak Posting Veteran

57 Posts

Posted - 2008-08-26 : 12:50:58
Found a lot of great examples thanks!
Go to Top of Page
   

- Advertisement -