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
This was solved , the reason was because I didn't expand inline , Anyways I did find a way to solve this. If anyone has question which get you to this post , please don't hesitate to message me
Hi Craig,
is EmiratesID a text data type attribute?
Regards
Hi @José Gonçalves , Yes it is. My bad for not being clear.
Why do you call the parameters with an assign/comparison?
I learned to call SQL SPs as:
EXEC uspCascadeDelete @ParentTableId, @WhereClause, @ExecuteDelete
https://www.codeproject.com/Questions/800672/how-to-execute-stored-procedure-in-sql-with-multip
https://www.google.com/amp/s/lukelowrey.com/magic-cacscade-delete-sql-server-script/amp/
Hi Craig Rodrigues
You need to escape the single quotation.Convert to 2 single quotes.
Kind Regards