• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • 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

Collapse
X
  •  
  • Filter
  • Time
  • Show
Clear All
new posts

    #11
    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)
    It's about time I changed this sig...

    Comment


      #12
      hey, pivot worked fine.



      thanks guys
      (\__/)
      (>'.'<)
      ("")("") Born to Drink. Forced to Work

      Comment


        #13
        you going to post your solution?
        Coffee's for closers

        Comment


          #14
          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.
          It's about time I changed this sig...

          Comment


            #15
            Originally posted by MrRobin View Post
            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.
            yup its new...
            http://www.devx.com/dbzone/Article/28165
            Coffee's for closers

            Comment


              #16
              Originally posted by Spacecadet View Post
              Ooo, groovey. I shall bear it in mind when I work somewhere that have finally upgraded!
              It's about time I changed this sig...

              Comment


                #17
                Originally posted by MrRobin View Post
                Ooo, groovey. I shall bear it in mind when I work somewhere that have finally upgraded!
                you don't have your own SQL Server installations?
                Coffee's for closers

                Comment


                  #18
                  Originally posted by Spacecadet View Post
                  you don't have your own SQL Server installations?
                  Nope.
                  It's about time I changed this sig...

                  Comment


                    #19
                    Originally posted by MrRobin View Post
                    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.

                    Comment


                      #20
                      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-Devel...5326859&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
                      Coffee's for closers

                      Comment

                      Working...
                      X