Forum Replies Created

Viewing 15 posts - 6,031 through 6,045 (of 7,164 total)

  • RE: Use of temporary tables

    I agree with Paul in that "It Depends".

    Just to add a my two cents to the discussion:

    Concrete tables used in a temporary way and truncated before and/or after each use...

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • RE: One procedure to insertupdate all master tables using if statements

    TheSQLGuru (6/17/2011)


    vmssanthosh (6/16/2011)


    hi

    Who is lady gaga?

    This is an American cultural reference to a sometimes strange pop singer. Search the web for any number of VERY interesting pictures of outfits...

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • RE: Bulk insert changing order of file...

    GSquared (6/17/2011)


    opc.three (6/17/2011)


    That's why the IDENTITY column is added in Step 1.

    You're not going to "physical order" are you? I'm pretty sure all that's needed is logical order. Once the...

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • RE: One procedure to insertupdate all master tables using if statements

    vmssanthosh (6/16/2011)


    hi

    Who is lady gaga?

    *reach hand up, push rock away*

    http://tinyurl.com/3z7zvuj

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • RE: Does anyone have a good reason to run xp_CmdShell?

    GSquared (6/17/2011)


    Jeff Moden (6/17/2011)


    opc.three (6/16/2011)


    :Wow: I just set myself up big time huh?

    Nah... considering the number of hacker attacks designed specifically to exploit OLE DB Automation, I can see your...

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • RE: Problems with CTE (recursive)

    OK, maybe I missed it. I think your example resultset has a circular reference in it and it was throwing me off.

    Can you please fix this so it says...

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • RE: Bulk insert changing order of file...

    That's why the IDENTITY column is added in Step 1.

    You're not going to "physical order" are you? I'm pretty sure all that's needed is logical order. Once the data is...

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • RE: Error handling for dynamic sql - please advise

    hxkresl (6/17/2011)


    I have read BOL and can see how to place begin/try around regular select statements, but not around dynamic sql statements. Would you mind giving me a suggestion about...

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • RE: One procedure to insertupdate all master tables using if statements

    Jeff Moden (6/16/2011)


    opc.three (6/16/2011)


    While your manager is outside the box ask him/her to consider what will happen when two people need to modify "The Proc"...one to change how Lady GaGa...

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • RE: Does anyone have a good reason to run xp_CmdShell?

    Jeff Moden (6/16/2011)


    opc.three (6/16/2011)


    No.

    How's that for short, sweet and accurate? 😉

    That absolutely works for me. 😀 It would be very cool if you told me what you use instead....

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • RE: Error handling for dynamic sql - please advise

    PS I didn't notice any transaction handling in your code. If you're operating on a table or set of tables more than once inside a "unit of work" you may...

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • RE: Error handling for dynamic sql - please advise

    Ever used TRY/CATCH ? It's awesome 😎

    BEGIN TRY

    EXEC('raiserror(''Bad stuff happened...'',11,1);') ;

    END TRY

    BEGIN CATCH

    SELECT ERROR_MESSAGE() AS [error_message]

    END CATCH

    <my_two_cents>If you insist on full...

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • RE: Bulk insert changing order of file...

    newbie.with.sql (6/16/2011)


    I have a flat file that I importing into my database but the rows are not coming into the table in the same order as in the flat file....

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • RE: USING CASE

    ash0550 (6/16/2011)


    Ninja's_RGR'us (6/16/2011)


    ash0550 (6/16/2011)


    select BillOfMaterialsID,

    case when BillOfMaterialsID <= 100 then 'Cheap'

    When BillofMaterialsID between 101 and 500 then 'Medium'

    When BillofMaterialsID between 501 and 1000 then 'HIGH'

    When BillofMaterialsID between...

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • RE: USING CASE

    How about some DDL, DML and some expected results? The article has examples of the items I'm asking for.

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

Viewing 15 posts - 6,031 through 6,045 (of 7,164 total)