I like to generate a stored function in iAnywhere 17.
The code, tested in Central works fine, but I want to create the function in the database if not exits during software application using EXECUTE IMMEDIATE (:ls_sql_string).
But there are double quoted declarations of Variables an single quoted variables for strings in the SQL commandstring, so EXECUTE IMMEDIATE generates an error.
I tried to replace all quotes with ~", so the SQL string seems to be in right syntax, but EXECUTE IMMEDIATE generates also an error.
How can I get the SQL into a string to work?
There is a Database Command EXECUTE IMMEDIATE USING QUOTES ON but this is not accepted in Powerbuilder.
How can I get the Execution work?
Thanks!
Stephan