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

Transfering from Access to MS SQL 2000

Status
Not open for further replies.

pyth0n

Programmer
Jan 26, 2005
23
GB
We are moving from MS Access to MS SQL Server 2000. Some of our Access applications use crosstab queries with the following SQL:

TRANSFORM Count([CHTest3].FacingsX) AS CountOfFacingsX
SELECT [CHTest3].[LM ID Number]
FROM [CHTest3]
GROUP BY [CHTest3].[LM ID Number]
PIVOT [CHTest3].Product;

What would be the best way of replicating this behaviour as I can't find anything similar in the T-SQL documentation.

Much obiliged for your help
 
Stored proc that generates crosstab query with dynamic SQL and then executes it.

Or client-side crosstab.

------
[small]select stuff(stuff(replicate('<P> <B> ', 14), 109, 0, '<.'), 112, 0, '/')[/small]
[banghead]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top