SQLTeam.com | Weblogs | Forums

Delete records


#1

Please help with this code, not working

delete from st where ststamp in ( select ststamp from st where familia = 'Pxpto')

the select statements works, but the delete not.
thanks


#2

why are you not just using the Familia to delete the records?

delete from st 
where familia = 'Pxpto'

#3

already tried with this code, however the following error appears:

"Msg 512, Level 16, State 1, Procedure tr_st_delete, Line 26
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
The statement has been terminated."


#4

you get that error when doing this??

do you have trigger on that table?


#5

it was that, I stopped the delete trigger and erased the data
Thanks a lot for the help