Forum Replies Created

Viewing 15 posts - 7,201 through 7,215 (of 7,616 total)

  • RE: T-SQL Help Needed

    Lynn Pettis (9/17/2012)


    I still doubt that ecommerce sites use your email address as a primary key. This is a volitale attribute subject to change, and isn't one I would...

  • RE: Stored Procedure help

    sorry last request... if Sunday were to be added on there? So both Saturday and Sunday.

    I'll assume you want to count them separately. If you want a total...

  • RE: Stored Procedure help

    DECLARE @year int

    SET @year = 2012 --<<-- chg as needed

    SELECT

    month_start,

    --'19000106' is a Saturday, so DATEDIFFs below count Saturdays:

    ...

  • RE: Stored Procedure help

    GSquared (9/17/2012)


    ScottPletcher (9/14/2012)


    Code below has fewer calcs and does not depend on any SQL date settings.

    DECLARE @year int

    SET @year = 2012 --<<-- chg as needed

    SELECT

    month_start,

    ...

  • RE: Puzzle : Generating two unique numbers from an array of numbers (repetation not allowed)

    ben.brugman (9/17/2012)

    Here ScottPletcher is the winner, but he used 'extra' intelligence to solve the puzzle using reasoning he solved part of the puzzle, if that is allowed, some more reasoning...

  • RE: T-SQL Help Needed

    This is an old programming trick. When New York State used Social Security Numbers for student ids, they forced students to get an SSN or they assigned a dummy number...

  • RE: Using Print, will it slow down procedure?

    ScottPletcher (9/14/2012)


    SQL Kiwi (9/14/2012)

    My guess is that there is no special cache for definitions; the pages of sys.sysobjvalues are cached in the buffer pool just like the pages of any...

  • RE: Reasons why free space on a restored read-only database may be different than the original (assuming no data changes)?

    Hmm, no good reason is materializing in my mind right now.

    What method did you use to determine the freespace (change)?

  • RE: Using Print, will it slow down procedure?

    SQL Kiwi (9/14/2012)

    My guess is that there is no special cache for definitions; the pages of sys.sysobjvalues are cached in the buffer pool just like the pages of any other...

  • RE: Using Print, will it slow down procedure?

    SQL Kiwi (9/14/2012)

    The original source must stay available, so must be cached somewhere.

    It's always available from disk of course. Must be cached? No. Might be cached? ...

  • RE: Date conversion problem

    Better still, just always use 'YYYYMMDD[ 24h:mm:ss.sss]', which always works, regardless of SQL settings.

    '20120427'

  • RE: Using Print, will it slow down procedure?

    SQL Kiwi (9/14/2012)


    ScottPletcher (9/14/2012)


    You do realize that comments still take up space in the proc cache, right?

    They take up no space in the plan cache. The plan cache is...

  • RE: T-SQL Help Needed

    A company I worked for produces clothing catalogs... They now have multi-part keys into almost all their other tables (Brand, Year and catalogue code) which slows down development, testing and...

  • RE: Using Print, will it slow down procedure?

    Peter Brinkhaus (9/14/2012)


    ScottPletcher (9/14/2012)


    I never stated, or implied, that the comments would affect the execution time (I said "procedure cache", not "plan cache"; I know some people use them interchangeably,...

  • RE: Using Print, will it slow down procedure?

    I never stated, or implied, that the comments would affect the execution time (I said "procedure cache", not "plan cache"; I know some people use them interchangeably, but I don't...

Viewing 15 posts - 7,201 through 7,215 (of 7,616 total)