Viewing 15 posts - 5,581 through 5,595 (of 18,926 total)
There's no begin after <> 'LX'
Reformatted code...
CREATE TRIGGER TRG_INS_CARTOES ON dbo.CARTOES
INSTEAD OF INSERT
AS
begin
declare @NUMCARTAO...
June 1, 2011 at 11:33 am
Re-read bol... async means that the query won't wait for the stats to be updated before running (a new plan will be generated next time... or whenever the update is...
June 1, 2011 at 11:31 am
DevNate (6/1/2011)
Do you mind providing an example?
What's unclear?
A calendar table has all the dates relevant to your project.
Select all the data in the range of date of the query from...
June 1, 2011 at 11:30 am
Build a calendar table, do myquery right join calendar where calendar between @start and @end.
Then you'll be able to use isnull()
June 1, 2011 at 11:25 am
Leave it as is.
If this hurts your server's performance during the stats update then you have a lot more to worry about than auto-stats updates.
June 1, 2011 at 11:24 am
GilaMonster (6/1/2011)
exec (@var1)Need brackets or the contents of the variable are interpreted as an object name.
He figured that 1 out in his 2nd post.
June 1, 2011 at 11:22 am
When does the trigger fail? Creation time or execution time?
If it's at execution you could possibly have another trigger throwing that error tho I find this highly unlikely.
June 1, 2011 at 11:14 am
river1 (6/1/2011)
Yes, i cliked and it redirect me to the END ELSE BEGIN...
Ok then it's possibly the buggy part...
Try just running the printed version of the dynamic code.
Start by commenting...
June 1, 2011 at 11:11 am
Rebuild the index only update the stats for THAT index, not all other columns.
Gail's article is still what makes the most sense. If not that then it's parameter sniffing.
When...
June 1, 2011 at 10:58 am
It must be something really simple.
Both the proc and the dynamic sql successfully compile on my PC and I just can't pick up the problem area just from reading the...
June 1, 2011 at 10:56 am
Just have time for super quick answer...
Here's a working piece of concatenation code. Change ONE thing at a time and you'll understand where you're having issues. I remember...
June 1, 2011 at 10:41 am
Target those tables and run update stats early in the day (after a decent amount of data has started being added to those tables).
June 1, 2011 at 10:38 am
Keep in mind that dbs can be dettached so before deleting something make REALLLLLLLLLLY sure it's not needed anymore... and even then burn it cd/dvd if possible.
June 1, 2011 at 10:37 am
This command is responsible for the first 2 lines of the warning :
EXEC sp_rename 'CARTOESTEMP', 'CARTOES'
The rest of the error message is incomplete. My guess is that there's...
June 1, 2011 at 10:27 am
Sayeed Master (6/1/2011)
can you elaborate?what wrong with using cursor?
Slow as hell in sql server.
It's faster to use an inner join and filter everything there.
June 1, 2011 at 10:24 am
Viewing 15 posts - 5,581 through 5,595 (of 18,926 total)