Forum Replies Created

Viewing 15 posts - 7,186 through 7,200 (of 7,608 total)

  • RE: T-SQL Help Needed

    Eugene Elutin (9/17/2012)


    GSquared (9/17/2012)


    Eugene Elutin (9/17/2012)


    And you didn't respond to the basic assertion about e-mail, which is its horrible weakness as a primary key for human beings. I...

  • RE: T-SQL Help Needed

    Do yahoo and other email provides allow expired and reclaimed email addresses to be re-cycled?

    If any of them did recycle one, and I got the same email address as a...

  • RE: T-SQL Help Needed

    CELKO (9/17/2012)

    Think of a parking garage (disk) and parking slot numbers (identity, rowid, or other physical locator). The slot number does not appear on your insurance from, at the DMV,...

  • RE: select query

    Luis Cazares (9/17/2012)


    I came out with the same code as Jeff showed in the article, but I believe that Scott's code would be better as it is a single table...

  • RE: select query

    SELECT

    CustId

    FROM dbo.product_details

    GROUP BY

    CustId

    HAVING

    MAX(CASE WHEN ProdId = 0 THEN 1 ELSE 0 END) = 0 AND

    ...

  • RE: Stored Procedure help

    GSquared (9/17/2012)

    FROM (

    SELECT CAST(CAST(@year * 10000 + 0101 AS char(8)) AS datetime) AS month_start UNION ALL

    SELECT CAST(@year * 10000 + 0201 AS...

  • RE: T-SQL Help Needed

    CELKO (9/17/2012)

    Wikipedia says that as of 2011, more than 2.2 billion people – nearly a third of Earth's population — have email. I seldom work with a target audience...

  • 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)?

Viewing 15 posts - 7,186 through 7,200 (of 7,608 total)