Anyone know how I can loop through the following select statement? I get multiple rows for a user if they have a value in all the following fields [CDM Master Access], [KnowledgeMaster Access], [Knowledge Source Access]. I'm trying to get it all to just show on one row .
,[CDM Master Access]=
WHEN c.ProductAreaName= 'BPI.Net' THEN 'CDM Master'
WHEN c.ProductAreaName= 'BPI KnowledgeMaster' THEN 'KnowledgeMaster'
WHEN c.ProductAreaName= 'Knowledge Product' THEN 'Knowledge Source'
,max(logtime) as Last_Login
,count(*) as Num_Of_Sessions_to_CurrDate