Skip to content

Binding variables in xml string to execute PL/SQL statement #506

Discussion options

You must be logged in to vote

Bind variables cannot be placed inside strings -- which is what you are doing. You would have to do something like this instead:

query ='''
begin
my_user.AQ_UTIL.ENQUEUE('...<subscriberInfo><msisdn>' || :1 || '</msisdn><iccId>' || :2 || '</iccId><imsi>' || :3 || '</imsi><serviceProviderId>' || :4 || '</serviceProviderId><paymentType>' || :5 || '</paymentType></subscriberInfo>', 'my_user.Q_A_TO_B', NULL);
end;

As noted, the other option is to use Python to create the string and pass that in as a single bind variable.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@urosdigital
Comment options

Answer selected by cjbj
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants