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 |
|
akas
Starting Member
42 Posts |
Posted - 2009-03-09 : 15:41:34
|
| hi guys,this is simple delete statement but still its not working..i want to delete the value of the field review for this particular itemnmbr from this table but its not deleting..is anything wrong in my statement?Thanks for ur help.delete reviewfrom myreaderreviewwhere review_date = '2000-04-02 18:40:31.000' and itemnmbr = '2724' |
|
|
vijayisonly
Master Smack Fu Yak Hacker
1836 Posts |
Posted - 2009-03-09 : 15:47:25
|
| Delete doesn't work that way...Use UpdateUpdate myreaderreview set review = '' where review_date = '2000-04-02 18:40:31.000' and itemnmbr = '2724' |
 |
|
|
yosiasz
Master Smack Fu Yak Hacker
1635 Posts |
Posted - 2009-03-09 : 15:58:12
|
| dependign on which table is parent...maybeDELETE FROM reviewWHERE ID IN (SELECT ID FROM myreaderreview review_date = '2000-04-02 18:40:31.000' and itemnmbr = '2724'); |
 |
|
|
Skorch
Constraint Violating Yak Guru
300 Posts |
Posted - 2009-03-09 : 17:39:00
|
| Your only problem that I see is you're trying to specify a column to delete. I'm assuming you're trying to delete the entire row, so the syntax would just be like this:delete from myreaderreviewwhere review_date = '2000-04-02 18:40:31.000' and itemnmbr = '2724'Some days you're the dog, and some days you're the fire hydrant. |
 |
|
|
|
|
|