Forum Replies Created

Viewing 15 posts - 271 through 285 (of 516 total)

  • RE: Changing Identity Columns

    cfradenburg (10/25/2012)


    Kenneth.Fisher (10/22/2012)


    Does anyone think I should go ahead and add this as a follow up QOTD? Or do one about reseeding causing a duplicate identity? Or not...

  • RE: PARSENAME

    Jamsheer (10/24/2012)


    Thanks for Good question..

    "Eid Mubarak" to all my SQL Friends.. 🙂

    "Eid Mubarak" Jamsheer 🙂

  • RE: PARSENAME

    Thanks for this question Ron. I was little confused when I saw this phrase "USING SQL SERVER 2012" 🙂

    I think PARSENAME result will remain same for SS2005, SS2008, SS2008 R2...

  • RE: Duplicate Foreign Key

    Primo Dang (10/23/2012)


    WayneS (10/23/2012)


    table can contain unlimited number of duplicate foreign keys, though the recommended maximum is 253

    So, we're now recommending building duplicate foreign keys?

    Personally, I thought that this...

  • RE: Duplicate Foreign Key

    call.copse (10/23/2012)


    I liked this question, as I wondered whether anyone would try running the sample code, and what would happen if they did (and I got it right comfortably!). Would...

  • RE: Duplicate Foreign Key

    rati0090 (10/23/2012)


    gud 1 but it should be 253 as their is a limit of 253

    This is the recommended maximum limit, but you can have infinite number of FK constraints in...

  • RE: Changing Identity Columns

    kapil_kk (10/22/2012)


    Execute this code and you will get duplicate values in Identity values--

    CREATE TABLE IdentTest

    ( Ident INT NOT NULL IDENTITY (1,1)

    , varfield varchar(100)

    )

    INSERT INTO IdentTest VALUES ('xyz') --...

  • RE: Changing Identity Columns

    kapil_kk (10/22/2012)


    in this case the max ident value would be 101 as with first insert statement the value of ident was 100 and with another insert statement the ident value...

  • RE: Changing Identity Columns

    kapil_kk (10/22/2012)


    in this case the max ident value would be 101 as with first insert statement the value of ident was 100 and with another insert statement the ident value...

  • RE: Changing Identity Columns

    john.arnott (10/21/2012)


    Good topic for a follow-up QOD (hope I don't steal any thunder here):

    If the code presented had one more statement amnd asked for the max(Ident)...

    CREATE TABLE IdentTest

    ( Ident...

  • RE: Changing Identity Columns

    Very nice question indeed. Guess what sould be the output of the last select statement, If I add a TRUNCATE statement in the code as well:

    CREATE TABLE IdentTest

    ( Ident...

  • RE: STR

    Thanks Ravi....was new for me. Was not aware that result can be "**" 🙂

  • RE: COALESCE

    kapil_kk (10/17/2012)


    But the query that you pasted is just simply give the first non null value as the coalesce does and give output as 'NULLFail'.... 😛 (no tricks in it)

    today's...

  • RE: COALESCE

    philip.cullingworth (10/17/2012)


    Lokesh,

    Thanks for correcting my mistake. What comes of trying to write a response before the coffee has kicked in.

    Philip

    You are welcome 🙂

  • RE: COALESCE

    philip.cullingworth (10/17/2012)


    To me this feels more like a trick question than a question about coalesce. The trick was to notice that 'NULL' was quoted and not the NULL value....

Viewing 15 posts - 271 through 285 (of 516 total)