Viewing 15 posts - 9,751 through 9,765 (of 14,953 total)
You could use sp_send_dbmail in a trigger. If you look that one up, it's pretty easy to implement.
April 28, 2009 at 1:40 pm
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...
April 28, 2009 at 1:39 pm
That one sounds like a serious candidate for optimization! 🙂
April 28, 2009 at 1:35 pm
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.
April 28, 2009 at 1:34 pm
tpepin (4/28/2009)
Lynn Pettis (4/28/2009)
tpepin (4/28/2009)
Andy DBA (4/28/2009)
April 28, 2009 at 1:30 pm
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...
April 28, 2009 at 1:24 pm
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...
April 28, 2009 at 1:09 pm
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....
April 28, 2009 at 1:03 pm
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...
April 28, 2009 at 1:01 pm
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...
April 28, 2009 at 12:58 pm
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...
April 28, 2009 at 12:56 pm
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.
April 28, 2009 at 12:49 pm
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...
April 28, 2009 at 12:47 pm
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...
April 28, 2009 at 12:43 pm
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...
April 28, 2009 at 12:19 pm
Viewing 15 posts - 9,751 through 9,765 (of 14,953 total)