1

DELETE FROM cats c WHERE EXISTS (SELECT 1 FROM owner_cats o WHERE o.id_cat = c.id_cat AND o.id_owner = 1)

Tables names are different. This is throwing sybase errror 107. The column prefix '%.*s' does not match with a table name or alias name used in the query. Either the table is not specified in the FROM clause or it has a correlation name which must be used instead. Explanation.

Everything seems to b e correct with query. Please help.

Pavan
  • 11
  • 1

1 Answers1

0

You gotta change it to DELETE cats FROM cats c (etc).

RobV
  • 2,263
  • 1
  • 11
  • 7
  • It's just how the syntax goes in ASE. The different SQL dialects actually allowing correlation names in different ways that have no logical explanation: the dialects have just grown in different ways. – RobV Jan 01 '17 at 13:59