Error in the Dynamic SQL query

Hi all,

i am trying to delete some records from the DB by using an adapter service, which has an dynamic SQL statement.

delete from EVENTS where ${where}

AND i have the following error,
[ADA.1.316] Cannot execute the SQL statement “delete from EVENTS where ORDERID=10 AND REASON=mk”. "
(17003) Invalid column index"
Invalid column index.

I am building a where clause, where it will take orderid and reason… and reason is an optional value.

Does anyone has idea on this ? please help me.:confused:

Hello

Is this working when you do it in any other SQL editor?.

thanks
Anil

Shouldn’t there be single quotes around mk?