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 |
|
dnf999
Constraint Violating Yak Guru
253 Posts |
Posted - 2007-05-21 : 06:23:47
|
Hi Please can you tell me why this doesn't work!:delete from Test_Searches a join Single_Distinct_Dupes bon a.batesbeg = b.batesbeg and a.ID <> b.ID where a.Multiple_Country_Hits <> 1 Error:Msg 102, Level 15, State 1, Line 1Incorrect syntax near 'a'.Thanks! |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2007-05-21 : 06:36:00
|
| delete theTableAliasYouWishToDeleteFromGoesHerefrom Test_Searches a join Single_Distinct_Dupes bon a.batesbeg = b.batesbeg and a.ID <> b.ID where a.Multiple_Country_Hits <> 1_______________________________________________Causing trouble since 1980blog: http://weblogs.sqlteam.com/mladenp |
 |
|
|
dnf999
Constraint Violating Yak Guru
253 Posts |
Posted - 2007-05-21 : 06:47:21
|
| Awesome, thanks! Was really bugging me.... |
 |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2007-05-21 : 07:49:51
|
| here's a little tip how to go about deleting data:create a select that wil return the data you wish to delete.then simplyreplaceselect ...from ...with delete tableAliasFromWhichYouWantToDeleteFromfrom ...._______________________________________________Causing trouble since 1980blog: http://weblogs.sqlteam.com/mladenp |
 |
|
|
|
|
|