Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
dba123
Yak Posting Veteran
90 Posts |
Posted - 2007-03-12 : 12:57:03
|
do I use NOLOCK for Deletions and Updates rather than just Select statements?I tried this:delete from ProductFilewhere ProductID in (blah blah blah)and get the error Line 4: Incorrect syntax near '('. |
|
JohnH
Starting Member
13 Posts |
Posted - 2007-03-12 : 13:17:45
|
Try this:delete ProductFilefrom ProductFilewhere ProductID in (blah blah blah)John Hopkins |
 |
|
Kristen
Test
22859 Posts |
Posted - 2007-03-12 : 22:25:11
|
Have you got some commas in there?delete from ProductFilewhere ProductID in (blah, blah, blah)Kristen |
 |
|
JohnH
Starting Member
13 Posts |
Posted - 2007-03-13 : 16:56:05
|
... guess I was copy-paste lazy ...John Hopkins |
 |
|
dba123
Yak Posting Veteran
90 Posts |
Posted - 2007-03-13 : 20:41:22
|
crap, I gave the wrong example. I found out only to use nolock on selects. |
 |
|
dba123
Yak Posting Veteran
90 Posts |
Posted - 2007-03-13 : 20:41:58
|
I thought maybe you could use nolock on updates and delete statements but obviously that's not possible |
 |
|
Kristen
Test
22859 Posts |
Posted - 2007-03-14 : 05:04:11
|
Hehehe ... OK. But FWIW I personally think that NOLOCK on SELECTS is a bad idea too ... it usually indicates "submarining" of a problem, and I take a similar view with DISTINCT ....What's the underlying problem you are wrestling with?Kristen |
 |
|
|
|
|