Viewing 15 posts - 24,076 through 24,090 (of 26,490 total)
Sounds like you need to break down your update into smaller batches instead of one big update. Could you post your update query?
😎
October 23, 2008 at 9:35 am
This gets into basic BOOLEAN LOGIC. Your where clause is this:
name <> 'name1' and age <> 25
That is equvilent to this:
not (name = 'name1' or age = 25)
For proof...
October 23, 2008 at 9:17 am
Read BOL topics DDL Triggers and Event Notifications.
😎
October 23, 2008 at 8:50 am
Have you looked at the execution plan with this option on the query to see what is different?
😎
October 23, 2008 at 8:43 am
You also may need to update the statistics on the table, possibly using a fullscan.
😎
October 23, 2008 at 7:57 am
I suggested it a few months ago when I was getting ready to start a major project using it and thought a dedicated forum would be useful. Unfortunately, the...
October 22, 2008 at 7:31 pm
Which comes back to limiting the number of rows queried from Tally. For example:
and t1.N <= datediff(mm, @startdate, @enddate) -- you might want to add a + 1 here...
October 22, 2008 at 5:40 pm
FYI...
select dateadd(dd, 1000000, '2008-10-22')
returns: 4746-09-19
😎
October 22, 2008 at 4:51 pm
Remember when I said there were 97199 months between 1900-01-01 and 9999-12-31? Well, if you multiply 97,199 by 365 you get 35,477,635. Your Tally table (and mine) has...
October 22, 2008 at 4:46 pm
There is no restriction there on the number of rows being returned from Tally. That is why you should add a second condition to the where clause, such as:...
October 22, 2008 at 4:32 pm
Answer, with out restricting the number of rows from the Tally table, SQL executes the dateadd function for every row in Tally until it errors.
😎
October 22, 2008 at 4:24 pm
john.steinbeck (10/22/2008)
I want your machine, dangit...I ran it again, it does produce the 61 rows but I also get the error thrown up... here is a pic
I get the same...
October 22, 2008 at 3:21 pm
The number of months between 1900-01-01 and 9999-12-31 is 97199. Your query, even though it stops at '2013-08-25 00:00:00.000' still attempts to calculate dateadd through the entire Tally table....
October 22, 2008 at 3:10 pm
I'd also recommend reading the following article:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
It provides excellent guidelines on how to post a question to get the best response possible.
😎
October 22, 2008 at 3:00 pm
Viewing 15 posts - 24,076 through 24,090 (of 26,490 total)