• vinu512 (8/17/2012)


    dwain.c (8/17/2012)


    Look at BOL: http://msdn.microsoft.com/en-us/library/ms188001(v=sql.105).aspx

    Does the first example on that page do what you want?

    If not, perhaps I'm misunderstanding.

    Yes, that's the article I read to start with this. I was implementing the Example B from the link.

    But I think I've tried to implement in 'n' no. of ways but nothing has worked yet...I've been trying since morning and haven't been able to do it.

    Looks like its just one of those days. I must be missing something.

    Dwain could you please give it a shot if ur free??....in the name of sql 😉

    I'm always willing. 🙂

    I'm just not sure I understand what you're trying to do well enough to offer further suggestions.

    Perhaps if you showed some example expected output and gave more details on what parameters you want to pass in and why you need to, it might help.

    I've done something like the example I referenced before and I admit it was kind of confusing at first.


    My mantra: No loops! No CURSORs! No RBAR! Hoo-uh![/I]

    My thought question: Have you ever been told that your query runs too fast?

    My advice:
    INDEXing a poor-performing query is like putting sugar on cat food. Yeah, it probably tastes better but are you sure you want to eat it?
    The path of least resistance can be a slippery slope. Take care that fixing your fixes of fixes doesn't snowball and end up costing you more than fixing the root cause would have in the first place.

    Need to UNPIVOT? Why not CROSS APPLY VALUES instead?[/url]
    Since random numbers are too important to be left to chance, let's generate some![/url]
    Learn to understand recursive CTEs by example.[/url]
    [url url=http://www.sqlservercentral.com/articles/St