Dougy
Дата: 23.01.2013 14:36:02
Относительно простой запрос на удаление выдает ошибки:
delete from Fr_Gar_Sostav1 f1 where f1.InventoryID not in (select f2.InventoryOwnerID from Fr_Gar_Sostav1 f2 where f2.Cat=28) and f1.Cat=28
Server: Msg 170, Level 15, State 1, Line 1
Line 1: Incorrect syntax near 'f1'.
Server: Msg 156, Level 15, State 1, Line 2
Incorrect syntax near the keyword 'and'.
При этом выборка работает без проблем:
select * from Fr_Gar_Sostav1 f1 where f1.InventoryID not in (select f2.InventoryOwnerID from Fr_Gar_Sostav1 f2 where f2.Cat=28) and f1.Cat=28
Помогите понять, что не так, заранее спасибо:)