Forum Replies Created

Viewing 15 posts - 3,181 through 3,195 (of 14,953 total)

  • RE: Are the posted questions getting worse?

    When I was coming from a VB background into SQL, I was used to the Now() function to get the current date and time, and didn't yet know about GetDate()....

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Error in stored procedure

    It was unclear because Commit only decrements the trancount by 1 till that hits 0, and then it actually commits stuff. Rollback takes you all the way to the...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: guyz help me

    while (1=1)

    begin

    set rowcount 1

    select @temp1= A ,

    @temp2= B from #test

    if @@rowcount=0

    begin

    That @@rowcount will never equal zero.

    Try this, you'll see why:

    DECLARE @A CHAR(1) ;

    CREATE TABLE #T (C1 CHAR(1)) ;

    INSERT INTO...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Null Values doesn't Show up in Excel Destination file

    If you want the word "NULL" instead of a null value, then yes, you'll need to do that for each column.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: guyz help me

    faruk.arshad (10/6/2011)


    yes i know tat ..but i want to use loop becoz want clear looping concept in SQL jst pretty mch confuse in it..

    if object_id(N'tempdb..#T') is not null drop...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Error in stored procedure

    LutzM (10/6/2011)


    ...As a side note: if you're using nested transactions, be aware that a COMMIT or ROLLBACK only affect the outermost transaction (see BOL, Nesting Transactions for details).

    Not quite. ...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: guyz help me

    If the professor who assigned this is looking for a loop, then use a cursor for it. That's a "loop" in T-SQL.

    If it isn't homework, skip the loop and...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Null Values doesn't Show up in Excel Destination file

    You could use Coalesce or IsNull in your query.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Are the posted questions getting worse?

    Lynn Pettis (10/6/2011)


    GilaMonster (10/6/2011)


    Lynn Pettis (10/6/2011)


    Didn't GETDATE() use to (or still get) the same error?

    Yes, in SQL 2000.

    Then the code Jack ran into my be a vestige left over when...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Are the posted questions getting worse?

    Sean Lange (10/6/2011)


    Jack Corbett (10/6/2011)


    I refuse to feel old until the president of the U.S. is younger than me. Eventually it will happen, but not yet.

    Never really listened to...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Are the posted questions getting worse?

    Grant Fritchey (10/6/2011)


    Stefan Krzywicki (10/6/2011)


    GilaMonster (10/6/2011)


    Ninja's_RGR'us (10/6/2011)


    Grant Fritchey (10/6/2011)


    Steve Jones - SSC Editor (10/6/2011)


    If you haven't seen it, his 2005 Stanford Commencement. Excellent talk: http://www.youtube.com/watch?v=D1R-jKKp3NA&feature=player_embedded#!

    A sad day, and a reminder...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: size of indexes is greater than or equal to the actual size of the table...

    It will really depend on your table structure, index structure, and what type of data you are storing.

    If, for example, you have a clustered index with a fill factor of...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Trying to Calculate Date Differences Between Same Records in the Same Tables.

    Try this, see if it performs well enough on your actual data volume.

    SELECT *,

    DATEDIFF(DAY, OrderDate,

    ...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Where are all the MVBs?

    I haven't used Google docs much, but it sounds like it might be a way to get started.

    How would you migrate from docs to wiki?

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: How do you learn the advanced stuff?

    Building and administering Dev Edition on a VM isn't just for advanced features. It's how I learned the simple basics, too.

    Very useful technique.

    I also keep a database called ProofOfConcept...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

Viewing 15 posts - 3,181 through 3,195 (of 14,953 total)