Re: PLSQL and escaping the ' character
Date: Sat, 21 Jul 2001 21:58:15 GMT
Message-ID: <9h4stl019dg_at_drn.newsguy.com>
In article <PT8Z6.379$1F.111223009_at_newssvr15.news.prodigy.com>, "Mark says...
>
>Can anybody help
>
>I am using UTL_FILE.GET_LINE to read a comma delimited string from a file eg
>"111","abc","def","ghi" etc etc etc
>
>I figure that I can use the TRANSLATE function to change the " to a ' and
>then submit the whole line as an insert statement using
>DBMS_SQL. I am having trouble with the syntax of escaping the ' in the
>function - can anybody give me some pointers.
>
>Thanks
>Mark
>
>
don't hard code the constants in the insert statement -- you must use bind variables (if you want your code to perform, to scale, and to not trash the shared pool).
see
http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:322417112080
for the plsql that works like a mini-sqlldr.
-- Thomas Kyte (tkyte_at_us.oracle.com) http://asktom.oracle.com/ Expert one on one Oracle, programming techniques and solutions for Oracle. http://www.amazon.com/exec/obidos/ASIN/1861004826/ Opinions are mine and do not necessarily reflect those of Oracle CorpReceived on Sat Jul 21 2001 - 23:58:15 CEST