Forum Replies Created

Viewing 15 posts - 8,446 through 8,460 (of 14,953 total)

  • RE: Comparing multiple values with column value

    Adding top to this just adds processor cycles without accomplishing anything.

    - 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: Is there column level trigger in sql 2005

    Pakki (9/2/2009)


    GSquared (9/2/2009)


    create trigger dbo.NameStuff on dbo.MySourceTable

    after insert

    as

    set nocount on;

    insert into dbo.MyTargetTable (Name)

    select Name

    from inserted

    where Name is not null;

    It'll look something like that. If you select from the "inserted"...

    - 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: Checking for Triggers in a SQL2005 Database

    Yep. Assuming you mean join the parent_id in sys.triggers to the object_id in sys.all_objects.

    - 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: Nested loop join does not work if the outer table is a heap?

    I'd still need to see at least the execution plans to be able to say much about this.

    - 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: Forcing a Select to use a specific index

    John Rowan (9/2/2009)


    So the moral of the story is that out of 15 years of SQL Server expreience, a query index hint was chosen as the solution 2 times! ...

    - 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: Gmail was down yesterday, but why they did the maintenance in the morning?

    I'm going to hazard a guess that either something went wrong with the maintenance, or the "maintenance" was actually disaster recovery, but some PR person said, "don't tell them something...

    - 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 a column of a table row by row in a Stored Procedure ? How To Do ?

    sascha (9/2/2009)


    Thank you all for your fast response, but i dont think that XML thing will help me. My example is abstract, the real Table is much more complex. ...

    - 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 a column of a table row by row in a Stored Procedure ? How To Do ?

    Jeff Moden (9/2/2009)


    Heh... ok... everyone always leaves the hard questions up to me so I'll break the ice on the hard question... 😉

    Why are we using SQL Server like a...

    - 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: Forcing a Select to use a specific index

    In my case, using With Recompile was tested, and that took longer than the compromise plan that I ended up using. Also, it can end up causing compilation locks...

    - 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: Stored Procedure performing a lot slower than TSQL

    Assuming you're using SQL 2005 (from the forum this is posted in), you have the ability in Management Studio to save the execution plans as .sqlplan files. Please 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: Stored Procedure performing a lot slower than TSQL

    Ian Scarlett (9/2/2009)


    GSquared (9/2/2009)


    To reiterate, what you're looking at is a classic example of parameter sniffing. At least, I'd bet 9:1 that's the problem. Take a look at...

    - 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: Can we stop OPENROWSET vulnerability?

    The ad hoc remote queries option doesn't block sa-level logins.

    Edit: And, honestly, if someone has the password to the sa account on your server, locking out OpenRowset is the least...

    - 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: Nested loop join does not work if the outer table is a heap?

    Can you post the two execution plans? Might be able to help more if I see them.

    - 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: Forcing a Select to use a specific index

    I am actually surprised by a few things you said. Years ago I used to work with a database called RDB. There was no way in RDB to influence 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: Stored Procedure performing a lot slower than TSQL

    To reiterate, what you're looking at is a classic example of parameter sniffing. At least, I'd bet 9:1 that's the problem. Take a look at Gail's blog entry...

    - 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 - 8,446 through 8,460 (of 14,953 total)