Re: quick pl/sql question

From: Stéphane Faroult <sfaroult_at_roughsea.com>
Date: Thu, 8 Oct 2015 12:35:47 -0500
Message-ID: <5616A973.3060504_at_roughsea.com>



Joe,

    What do you mean by "space in policy_num"? Leading, trailing, right in the middle? Right in the middle shouldn't be a problem, otherwise you may have to trim. All depends on where you extraneous spaces are: in the table or in the bind variable, because if it's in the table and you have no way to fix data entry you should probably consider, if the table is big, a function-based index.

HTH Stéphane Faroult

On 08/10/15 12:08, Sweetser, Joe wrote:
> (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:35:47 CEST

Original text of this message