Forum Replies Created

Viewing 15 posts - 13,786 through 13,800 (of 14,953 total)

  • RE: SQL Query using linked server

    It doesn't matter that multiple users will access the proc at the same time. Temp tables are connection-specific.

    So long as your tempdb database has enough room in it (or...

    - 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: Any better than IF @@ERROR <> 0 error handling?

    riga1966 (5/7/2008)


    We don't have "Common" database.

    Should I create one to store common objects?

    That's what I do.

    - 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: Index creation taking long time

    UDBNT (5/8/2008)


    Bowing to those individuals with better SQL knowledge than me, but surely the supplied statements from zahran is a bit like running down the road to the sweet shop...

    - 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: random Number

    If it needs to be unique, why does it need to be random?

    Would a sequential (identity) number accomplish what you need?

    If it truly needs to be both random and unique,...

    - 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: The "Numbers" or "Tally" Table: What it is and how it replaces a loop.

    Jeff Moden (5/7/2008)


    GSquared (5/7/2008)


    I ran some speed and load tests on this code.

    Summary: While the CTE works, and is fast by any normal standard, the Numbers version is even faster,...

    - 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: Regarding Encryption

    If I'm not mistaken, the specifications for the encryption protocol will give you that information.

    - 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 Handling

    Mahesh Bote (5/5/2008)


    [font="Verdana"]

    ...As soon as there is an error, it exists the stored proc and goes to the .net code...

    Are you handling errors at front end with Try Catch block?...

    - 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: Creating CURSOR

    SQL doesn't let you use variables that way.

    What I would do is (a) figure out if a cursor is really needed for this or if it can be replaced with...

    - 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: Any better than IF @@ERROR <> 0 error handling?

    riga1966 (5/7/2008)


    User defined proc in master

    so that you can call it from any database.

    In this case I don't have to create the same error_handing proc in each database.

    Makes sense?

    That works.

    Personally,...

    - 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 to increase number of threads in a process?

    TheSQLGuru (5/7/2008)


    ...Believe it or not, that wasn't the single worst problem that client had either! :Whistling:

    Actually, when I see one totally assinine thing in the server, I assume there's...

    - 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: Index creation taking long time

    Zahran (5/7/2008)


    Hi GSquared

    This will be run only once in the production.

    In that case, indexes are a waste of time. Don't bother with them.

    Indexes are mainly useful for data that...

    - 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: Help with query - Quick Response Needed

    Since you're using "convert decimal(3,2)", you're getting an overflow error if the number is higher than 9 in any case. In decimal, the numbers in the parentheses determine how...

    - 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: Problems with ghost cleanup system process

    I read that ghost cleanup is part of the autoshrink process. Do you have autoshrink turned on for this database? If so, turning that off should help your...

    - 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: update value from the max date value

    I'd do the whole thing as a calculated column, instead of updating it.

    alter table Table1

    add column AuthDate as (

    case

    when ADate > BDate and ADate > CDate then dateadd(day,...

    - 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: SQL Query using linked server

    Create the temp table first, then insert into it, instead of creating it as part of the select statement.

    - 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 - 13,786 through 13,800 (of 14,953 total)