• Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

sql server question

Ahh makes much more sense now...

Set up a loop on x to

Update ("B.F" + x)
where A.id = B.id and A.stepvalue = x

x goes from 1 to max(stepvalue)
 
How do you pivot tables in SQL server? Was it a new feature in the 2005 version?

I've used a crosstab stored procedure I found on t'intertron before but it was quite fiddly.
 
Ooo, groovey. I shall bear it in mind when I work somewhere that have finally upgraded!

You can of course use case...when...then...else to create a custom pivot function. I did this long ago when I was young and naïve. I am now firmly of the opinion that all pivoting should take place using client-side tools. If you really need to pivot your data you should really be re-designing the schema or creating some BI cubes.
 
tsk

You can get the developer edition of 2005 for about £50
and it is almost identicle to the full enterprise ediition and includes SSAS, SSRS, SSIS
http://www.amazon.co.uk/Server-Deve...sr_1?ie=UTF8&s=software&qid=1205326859&sr=8-1


Beta versions of 2008 are available to download for free from MS

If you're doing a lot of SQL Server work then I can't recommend getting your own copy enough for experimenting with
 

Advertisers

Back
Top