View Single Post
  #2 (permalink)  
Old 02-02-06, 16:16
blindman blindman is offline
World Class Flame Warrior
 
Join Date: Jun 2003
Location: Ohio
Posts: 11,556
Look up CROSSTAB queries in Books Online.
Code:
select	userid,
	max(case recordtag when 1 then record end) as firstname,
	max(case recordtag when 2 then record end) as middleinitial,
	max(case recordtag when 3 then record end) as suffix
from	[YourTable]
group by userid
__________________
If it's not practically useful, then it's practically useless.

blindman
www.chess.com: "sqlblindman"
Reply With Quote