Reputation: 255
I have an oracle stored procedure that works inside oracle however when I try to run it from sqlplus it does not work because the input value it takes in requires two spaces between the words. SQLPLUS automatically truncates this to a single space, for example.
sqlplus username/password @setup_run.sql 'Word1__Word2'
old 5: inparam1 := '&1';
new 5: inparam1 := 'Word1_Word2';
PL/SQL procedure successfully completed.
How do I stop this from happening? I do not want to manually parse the string and add a space because for other inputs that do not have the space this would cause issues.
Thanks,
Upvotes: 1
Views: 232
Reputation: 933
It's not sqlplus that does that, it's probably the system|shell. Windows XP does it for example, you can fix it by using double-quotes.
sqlplus username/password @setup_run.sql "Word1 Word2"
Upvotes: 1