“Select Distinct AD.TO_LOC
FROM ALLOC_HEADER AH, ALLOC_DETAIL AD
WHERE AH.ALLOC_NO = AD.ALLOC_NO
And AH.ORDER_NO = @PO”
I am trying to execute the above query as @PO is the Argument with contains the String value.
It gives the error as
Run query: ERROR [HY000] [Oracle][ODBC][Ora]ORA-00936: missing expression
Let SQL do the hardwork for you. Why not use Stored Procedure? That way you dont have to bother about string syntax’s. You call a Stored Procedure and it returns your query for you.
You still use the same Execute Query, but using a Stored Procedure will make the code easier to read and set a clear separation between UiPath and SQL related logic in your code.
Here is how you use Stored Procedure and parameters