Forum Replies Created

Viewing 15 posts - 8,266 through 8,280 (of 8,416 total)

  • RE: INSERT MONTH IF NOT IN

    RBarryYoung (4/19/2009)


    Technically, its a constant scan. They're very fast. 🙂

    Well I did say it was in disguise. 🙂

    Constant scans are quite fast.

    Not fast enough when SS2K5 uses them...

  • RE: T-SQL 2005 UPSERT help

    Hi,

    Several different solutions have been provided, all of which work - some even use EXISTS as you requested.

    If you don't understand them, please try again. If you still don't...

  • RE: The T-SQL Paradigm

    Lynn Pettis (4/19/2009)


    You know, after a SNOW DAY on Friday, it is actually quite nice here today in Colorado. So where are you that it is cold and wet?

    Wellington,...

  • RE: Delete trigger

    RBarryYoung (4/19/2009)


    Still a little puzzled. I thought that you only got row-versioning if you turned Snapshots or RCSI on?

    I know, it's a common thing. SS2K5 uses row-versioning internally...

  • RE: TSQL->C# SP

    Jeff Moden (4/19/2009)


    "It Depends" on the underlying reason as to why they want to move the logic.

    That's true. My point was that if the validation code already existed in...

  • RE: The T-SQL Paradigm

    RBarryYoung (4/19/2009)


    Which one's Snarky?

    If it helps at all (calm things down a bit) - I'm quite happy with the label 😉

    Everyone have a good day. It's wet and cold...

  • RE: Cross Tabs and Pivots, Part 1 – Converting Rows to Columns

    Jeff Moden (4/19/2009)


    That would be part of the problem.

    I quote "you owe me a new monitor!" :laugh:

  • RE: Best Replaces for Cursor

    Thank you RBarryYoung.

    @bitbucket: Please note that Paul Neilsen and I are different people. There is a clue in my surname.

    The example that springs to mind is where a...

  • RE: INSERT MONTH IF NOT IN

    RBarryYoung (4/19/2009)


    Actually for something this small you don't even need that. This should work:

    ...

    Select 1 as Month

    Union All Select 2

    ...

  • RE: T-SQL 2005 UPSERT help

    Replacing the UPSERT with a DELETE then INSERT doesn't scale very well.

    This is a demo of an alternative:

    --DROP TABLE #Destination, #Staging

    CREATE TABLE #Destination (a INT IDENTITY(1,1) PRIMARY KEY, Data VARCHAR(36)...

  • RE: Need to display ALL rows, even with Zero count

    I know it's deprecated, but GROUP BY ALL would work here:

    CREATE TABLE #t1 (a INT IDENTITY(1,1) PRIMARY KEY)

    CREATE TABLE #t2 (a INT IDENTITY(5,1) PRIMARY KEY)

    SET NOCOUNT ON

    GO

    INSERT #t1 DEFAULT VALUES;

    INSERT...

  • RE: display data between two dates week by week

    Just a quick addition:

    If you use DATEPART with weekday, make sure DATEFIRST is SET appropriately.

    It is possible to write the comparison generically for any DATEFIRST by using @@DATEFIRST, but I...

  • RE: INSERT MONTH IF NOT IN

    Hi,

    I'd like to help, but with the best will in the world: I can't make sense of your post.

    Sorry - I know it's difficult if English isn't your first language.

    Perhaps...

  • RE: Best Replaces for Cursor

    The answer is..."it depends!"

    Sometimes, a cursor *is* the optimal solution. Not often, but it does happen.

    If you tell us a little more background to your question, you may get...

  • RE: Delete trigger

    RBarryYoung (4/19/2009)


    Can you point me to an MS reference for that? I am getting conflicting info on that.

    Kalen wrote a good article for SQL Mag - but that's subscriber...

Viewing 15 posts - 8,266 through 8,280 (of 8,416 total)