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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MSSQL syntax

Status
Not open for further replies.

addrianne

Programmer
Apr 2, 2009
3
this is a sql syntax from microsoft access...

TRANSFORM Avg(dbo_tbl_000_ClassPrice_CSL.PriceAmount) AS AvgOfPriceAmount
SELECT dbo_tbl_000_ClassPrice_CSL.ClassName
FROM dbo_tbl_000_ClassPrice_CSL
GROUP BY dbo_tbl_000_ClassPrice_CSL.ClassName
PIVOT Format([EffectiveDate],"Short Date");


can anyone translate this to MSSQL syntax?
please..please..please...
 
Well, you should be looking into PIVOT command (SQL Server 2005 and up), but it's a bit hard to suggest something without your table structure, some sample data and desired output.
 
Addreianne, did you ever get a response to this? I have exactly the same need and would love to see a reply.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top