RE: quick pl/sql question
Date: Thu, 8 Oct 2015 17:29:07 +0000
Message-ID: <939730CDCC52DA43AB03D00E4C678B9C2EDFDFE5_at_goxsa3144.fplu.fpl.com>
I would put in some quotes. This should interpret the space as a part of the string.
SQL_Stmt := 'DELETE FROM renewal_expacc_data WHERE policy_num = '||chr(39)||:1||chr(39) ;
Thanks,
Jeremy
-----Original Message-----
From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Sweetser, Joe
Sent: Thursday, October 08, 2015 1:09 PM
To: oracle-l_at_freelists.org
Subject: quick pl/sql question
This is an EXTERNAL email. Exercise caution. DO NOT open attachments or click links from unknown senders or unexpected email.
(at least, I hope it's quick!)
I have a program that has these lines in it:
SQL_Stmt := 'DELETE FROM renewal_expacc_data WHERE policy_num = :1'; EXECUTE IMMEDIATE SQL_Stmt USING stage_data_rec.policy_num;
Policy_num is a character string. Everything seems to work fine unless there is a space in policy_num. Am I missing something obvious? Is there an easy way to quote the string for a bind variable that may contain spaces? Should I even have to do that??
Thanks in advance for any ideas/suggestions.
-joe
Confidentiality Note: This message contains information that may be confidential and/or privileged. If you are not the intended recipient, you should not use, copy, disclose, distribute or take any action based on this message. If you have received this message in error, please advise the sender immediately by reply email and delete this message. Although ICAT, Underwriters at Lloyd's, Syndicate 4242, scans e-mail and attachments for viruses, it does not guarantee that either are virus-free and accepts no liability for any damage sustained as a result of viruses. Thank you.
--
http://www.freelists.org/webpage/oracle-l
--
http://www.freelists.org/webpage/oracle-l
Received on Thu Oct 08 2015 - 19:29:07 CEST