Forum Replies Created

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

  • RE: Inserting value for identity column in a temporary table

    You can also insert explicit values into an IDENTITY column by using SET IDENTITY_INSERT ON.

    http://msdn.microsoft.com/en-us/library/ms188059.aspx


    "If I had been drinking out of that toilet, I might have been killed." -Ace Ventura

  • RE: DELETE + EXCEPT/INTERSECT + NULLS + BITS!

    Okay, not sure if this is of any interest or any use to anyone at this point, but here is basically what I ended up doing:

    IF object_id('tempdb..#Existing') IS NOT NULL

    DROP...


    "If I had been drinking out of that toilet, I might have been killed." -Ace Ventura

  • RE: Multiple ON Clauses In One Join?

    I am a huge fan of CTE's as well. I guess different structures are inherently more intuitive to different people. Perhaps with enough experience that will change and I will...


    "If I had been drinking out of that toilet, I might have been killed." -Ace Ventura

  • RE: Multiple ON Clauses In One Join?

    What a fantastic explanation! Thank you so much for taking the time!


    "If I had been drinking out of that toilet, I might have been killed." -Ace Ventura

  • RE: Multiple ON Clauses In One Join?

    Ohhhhhh! Okay, thank you. The indentation makes a massive difference in getting my head around it.

    Now that that part of it is solved, I guess I just need to...


    "If I had been drinking out of that toilet, I might have been killed." -Ace Ventura

  • RE: Multiple ON Clauses In One Join?

    Sorry, guilty as charged. Was trying to limit the code to only the relevant bit. Is this better?

    SELECT blablabla

    FROM

    T1

    FULL OUTER JOIN T2

    FULL OUTER JOIN T3

    INNER JOIN...


    "If I had been drinking out of that toilet, I might have been killed." -Ace Ventura

  • RE: DELETE + EXCEPT/INTERSECT + NULLS + BITS!

    I should probably just delete this thread since I got it off on the wrong foot by omitting DDL. Sorry again.

    I think I'm going to re-post it next week...


    "If I had been drinking out of that toilet, I might have been killed." -Ace Ventura

  • RE: DELETE + EXCEPT/INTERSECT + NULLS + BITS!

    Thanks for the reply! The problem is we still need the "other columns". Again, it's my bad for not getting the DDL together for this one first. I will try...


    "If I had been drinking out of that toilet, I might have been killed." -Ace Ventura

  • RE: Invalid Column Name error

    For what it's worth, I've noticed that in scripts where I first drop a table and then create it, I have to include the "GO" command after the initial DROP...


    "If I had been drinking out of that toilet, I might have been killed." -Ace Ventura

  • RE: DELETE + EXCEPT/INTERSECT + NULLS + BITS!

    I understand. I will try to come up with some good sample DDL. Thanks nonetheless for your efforts.


    "If I had been drinking out of that toilet, I might have been killed." -Ace Ventura

  • RE: DELETE + EXCEPT/INTERSECT + NULLS + BITS!

    What are Col1, Col2, Col3, Col4, Col5, Col6, Col7, Col8? I don't mean the data types, but what are they? Are any of these columns a unique or primary key...


    "If I had been drinking out of that toilet, I might have been killed." -Ace Ventura

  • RE: DELETE + EXCEPT/INTERSECT + NULLS + BITS!

    Sorry Lynn, I wasn't sure DDL was necessary in this case.

    Yes, we are importing data from an external source into Scratch, scrubbing it for dupes again Live, and then...


    "If I had been drinking out of that toilet, I might have been killed." -Ace Ventura

  • RE: DELETE + EXCEPT/INTERSECT + NULLS + BITS!

    SQL2K5. 🙁


    "If I had been drinking out of that toilet, I might have been killed." -Ace Ventura

  • RE: Solving the "Running Total" & "Ordinal Rank" Problems (Rewritten)

    Thanks, looks like QU is still a winner even in 2012. 🙂


    "If I had been drinking out of that toilet, I might have been killed." -Ace Ventura

  • RE: Solving the "Running Total" & "Ordinal Rank" Problems (Rewritten)

    Has anyone done any significant testing of the Quirky Update method in SQL Server 2008, 2012, or 2014? Does it work in those versions too?

    It's easy enough to test...


    "If I had been drinking out of that toilet, I might have been killed." -Ace Ventura

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