Forum Replies Created

Viewing 15 posts - 9,751 through 9,765 (of 14,953 total)

  • RE: Trigger

    You could use sp_send_dbmail in a trigger. If you look that one up, it's pretty easy to implement.

    - 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: t-sql help

    It's an undocumented table that SQL Server uses for it's own stuff. Basically, don't even try to change anything in it, but it can come in handy for generating...

    - 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: Indexing Options question

    That one sounds like a serious candidate for optimization! 🙂

    - 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: Query Performance

    I'd be willing to bet that rebuilding the indexes is in order here. That'll get your stats up to date, and index fragmentation is probably heavy.

    - 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: There Must Be 15 Ways To Lose Your Cursors… Part 2: Just Put It in a S

    tpepin (4/28/2009)


    Lynn Pettis (4/28/2009)


    tpepin (4/28/2009)


    Andy DBA (4/28/2009)


    I think suggestions for proper formatting and good comments are left out of many discussions and examples because the focus is more on performance...

    - 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: looping help

    To do that, you're going to have to use dynamic SQL. It's going to be relatively complex to do.

    http://www.Simple-Talk.com has a good article on dynamic pivots in T-SQL (that'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: How and where to start SQL DBA training

    I haven't read that one. The one I started with was "The SQL Server Bible", by Paul Nielsen. I started with the version for SQL 2000, but you'll...

    - 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: Shouldn't raiserror with a severity of 16 abort the stored proc?

    It depends on the proc. Some statements can be continued after an error, some can't. In SQL 2005 (or 2008), your best bet is to use Try...Catch blocks....

    - 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: t-sql help

    Put a semicolon in front of "WITH", so it's ";WITH". That should solve your syntax error. Common Table Expressions have to have a semicolon before them, unless they...

    - 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: Scheduled job fails intermittently

    If you check the logs, it'll generally have a lot more data about the error. Or you can right-click the job in Management Studio, select History, and then click...

    - 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: Indexing Options question

    Deadlocks are caused by resource conflicts that can't be resolved by the engine.

    If, for example, you allow row locks, and process A locks row 3, and needs row 5, but...

    - 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: looping help

    If you can provide the create scripts for the tables, I'm sure we can help you on this. Just need to see the table structures.

    - 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: Tsql solution for inserting multiple values

    Does something like this help?

    set nocount on;

    declare @String varchar(max);

    select @String = '123345,56432,99555,112244' ;

    insert into Etemp1(myfield)

    select substring(@String + ',', Number, charindex(',', @String + ',', Number) - Number)

    from dbo.Numbers

    where Number...

    - 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: There Must Be 15 Ways To Lose Your Cursors… Part 2: Just Put It in a S

    I the kind of data cleaning that you're talking about, I generally break it up into separate tests. Just make each test work on the whole table, or applicable...

    - 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: Different Methods of JOINing to table with 6.4 Million Records

    Sounds like you've probably got "good enough" in that case.

    If you want us to, we can take a look at the execution plan and see if there's anything that might...

    - 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 - 9,751 through 9,765 (of 14,953 total)