I am trying to execute a query which is as follows
update L2l_Lov_Master set QUERY_STRING = 'com.jmr.profitto.los.app.retail.model.L2LLdmLeadinformation entity WHERE entity.status IN ('NEW','REJECTED','REJECTED_BY_CUSTOMER')' where LOV_ID = 'customerLov-leadcode';
I am using oracle DB and i am getting "ORA 00933: SQL command not properly ended". Need to know where it went wrong
As far as I can tell, you problem is related with the quotes --> to be more explicit, you have a problem when your IN
clause starts because you close your first quote from query string
query_string = 'com.jmr.profitto.los.app.retail.model.L2LLdmLeadinformation entity WHERE entity.status IN ('
I think you need to encapsulate the quotes from the IN
clause so that they get ignored by the first query.
UPDATE l2l_lov_master
SET
query_string = 'com.jmr.profitto.los.app.retail.model.L2LLdmLeadinformation entity WHERE entity.status IN (''
new '','' rejected '','' rejected_by_customer '')'
WHERE
lov_id = 'customerLov-leadcode';
glad to help. Just as info, when creating the statement, there might be some differences in the text, so make sure you correct them before using the code in your live project. ( within the IN Clause I used lower case and added some spaces )