Forum Replies Created

Viewing 15 posts - 181 through 195 (of 304 total)

  • RE: CTE vs Derived Table

    Thanks to both of you for your replies. The articles were very helpful.

  • RE: Arrays in Stroed Prcoedure

    You have two options.

    The first is to construct your query using dynamic SQL.

    The second option is to convert the array to a table and then JOIN to that table.

    The following...

  • RE: Exporting several files using a table

    Your question is a little vague.

    Can you provide some more specifics? Like table definition and sample data?

    Forum Etiquette: How to post data/code on a forum to get the best help[/url]

    Edit:...

  • RE: triggers on update and multiple rows update

    Smartdog (11/10/2008)


    kuka_99 (11/10/2008)


    hi,

    i had the same problem. sql server trigger does not affect all rows when i updated more than one row a time.

    what i do now is to...

  • RE: CTE vs Derived Table

    Let's say we have a case where the same functionality can be accomplished with either a CTE or a derived table.

    Are there any performance benefits of the CTE?

    Also, if you...

  • RE: join 2 tables

    Great! Thanks for the feedback, Mathew 🙂

  • RE: Rowset Sum Collection

    I thought of a different way to do this, but I'd like to test it first.

    Can you please post some sample data?

  • RE: SELECT statement with variable numbers of columns

    Madhivanan (11/7/2008)


    ggraber (11/7/2008)


    Well. Also note that the procedure is dynamic and you can change the pivot or summary columns as you wish 🙂

    Yes, I think it's very cool.

    I've done a...

  • RE: SELECT statement with variable numbers of columns

    Madhivanan (11/7/2008)


    Did you try it?

    It exactly works as per OP's expected result

    I just tried it again, and you are correct, it works perfectly.

    I don't know why I couldn't get it...

  • RE: SELECT statement with variable numbers of columns

    Madhivanan (11/7/2008)


    ggraber (11/6/2008)


    I've been playing with using a dynamic PIVOT for your case, and it seems like it's going to be a little messy.

    I think Ken's solution is the way...

  • RE: join 2 tables

    You can use the STUFF function instead of creating your own function.

    Like this:

    -- first create some sample tables with data

    DECLARE @Table1TABLE

    (

    ClaimID VARCHAR(20)

    , ActivityCode INT

    , ActAmount INT

    , DenialCode CHAR(3)

    )

    INSERT INTO...

  • RE: SELECT statement with variable numbers of columns

    I've been playing with using a dynamic PIVOT for your case, and it seems like it's going to be a little messy.

    I think Ken's solution is the way to go.

  • RE: Need a single SQL SELECT for one to many relationship Tables

    How about this approach? It may be faster than using an inline function.

    [font="Courier New"]--create temp tables

    CREATE TABLE #Table1

    (

        A INT

       ,B VARCHAR(10)

    )

    CREATE TABLE #Table2

    (

        C INT

       ,D INT

       ,E VARCHAR(10)

    )

    --insert...

  • RE: Need help on performance and integrity

    AnzioBake (10/30/2008)


    By my definition, Iteration does NOT imply "non-set based" or RBAR (as Jeff would call it)

    My solution employs a loop, but the query in side the loop is still...

  • RE: Selecting records on condition that others exist.

    Nice post J.

    Davroche, we were all newbies once!

    Here's the type of code we were asking for, so you'll know next time you post.

    Now, all you need to do is...

Viewing 15 posts - 181 through 195 (of 304 total)