Extended challenge for everyone

  • Frank People who can communicate in more than one language truly amaze me. English is my native language (and only language much to my regret) and I often trip/fall over my own words making an arse of myself. So this time  will let you slide.

    Mike

  • Ready for the final solution to be posted??

  • C'est pas grave... on l'aime pareils .

  • D'Oh servents faibles thy d'élasticité de maître svp l'avantage de la sagesse thy
    Oh please master give thy poor servents the benefit of thy wisdom
    I love bablefish.
  • I think you should really stick to english only .

    I'll post the answer under a new thread.

  • How true once upon a time I could speak enough French to order a glass of wine and ask a girl to dance and Gernan to order beer (they do beer so much better than the French) and ask a girl to dance. Anything else was much to academic for me.

  • Hehe. The final explanation has been posted in another thread :

    http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=8&messageid=189202

  • When I wrote: "To me it looks like a ranking function on the 'id' field", I was right, wasn't I?

    It's basically...

    select id, name, colid, row_number() over (partition by id order by colid) as colid2

    from syscolumns

    ...right? (using SQL2005 syntax)

    The @LastID variable was simply the partitioning variable, as was suggested by comparing it to the id field each time.

    RobF

    Rob Farley
    LobsterPot Solutions & Adelaide SQL Server User Group
    Company: http://www.lobsterpot.com.au
    Blog: http://blogs.lobsterpot.com.au

  • I don't know the yukon syntaxe... but basically it increments colid and reseeds to 1 everytime the id changes.

Viewing 9 posts - 31 through 38 (of 38 total)

You must be logged in to reply to this topic. Login to reply