How do you concat to an advance Query ?

So basically I need to call a stored procedure for an upcascade delete




I have to expand inline elements showed above ,

The thing is when I try to call this advance query in an api call I get an error

Also I have to build safe in clause which causes an issue i.e 

 




How can we solve this to achieve this query or something similar


EXEC uspCascadeDelete 
@ParentTableId = 'DBO.OSUSR_2QX_DCD_Individual', 
@WhereClause = 'OSUSR_2QX_DCD_Individual.EMIRATESID in ('13','14')',  
@ExecuteDelete = 'Y'  
 
select @return

Even this doesn't work because of the single quotes. I need something similar and i'm all out of ideas

Hi Craig,

is EmiratesID a text data type attribute?

Regards


Champion

Hi Craig Rodrigues

You need to escape the single quotation.Convert to 2 single quotes.

Kind Regards

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.