[SQL] sql disaster - subquery error but delete continues

2010-09-10 Thread Greg Caulton
delete from form_record_details where form_record_id in (select form_record_id from forms where form_id= 40003656) Seems fine at 1am. However the subquery has a typo in it - there is no form_record_id in the forms table But rather than psql throwing an error... it deletes every row in the form_

Re: [SQL] sql disaster - subquery error but delete continues

2010-09-10 Thread Thomas Kellerer
Greg Caulton, 10.09.2010 11:46: delete from form_record_details where form_record_id in (select form_record_id from forms where form_id= 40003656) Seems fine at 1am. However the subquery has a typo in it - there is no form_record_id in the forms table But rather than psql throwing an error..