Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: errr, umm, variables in inserts, possible, help? :)
In article <se5r5u4ou54kh6hqnac4uhsq4pl6fjmdub_at_4ax.com>, Mike says...
>
>Hey all,
its not the equal sign -- it's the ampersand &
shows how they are used.
Just add:
set define off
at the top of your script, also add:
alter session set cursor_sharing=force;
and it'll run faster/smoother and won't kill your shared pool.
>
>I don't quite know how to explain the problem I'm having, mainly
>because I don't understand the problem, or even the point of what
>Oracle is doing.
>Due to a skirmish with Oracle before I got made redundant, and the
>boredom of unemployment, I've recently taken to learning something
>about Oracle.
>
>Anyway, the webhosting company I part run, log apache directly to
>MySql, a perfect source for an ass load of SQL data.
>The Oracle Migration Tool crashes, something to do with mm-mysql, I
>hate Java :)
>As the data isn't using any non Oracle standard (will that comment get
>me flamed? :P) I figured I could just @<file> import it from sqlplus
>(nice spamy way to do it, I know, after learning the hard way).
>
>Right, down to business.
>Most of it works fine, until it comes along a record with = signs in a
>varchar2.
>Then I get something like below...
>
>---
>Enter value for hl:
>Enter value for start:
>Enter value for sa:
>
>old 1: INSERT INTO logs_12 VALUES (15092, 7, 32, 48, 1, 12, 2001,
>'www.14-condoms.co.uk', 'pinky.notnet.co', '172.186.167.179', 'GET',
>NULL, '/board.html', 200, 21344, '',
>'http://www.google.com/search?q=durex+condoms+and+advertising&hl=en&start=10&sa=N',
>NULL, 'Mozilla/4.0 (compatible; MSIE 5.5; Windows 95)', 2, 0, 0, 0, 0)
>
>new 1: INSERT INTO logs_12 VALUES (15092, 7, 32, 48, 1, 12, 2001,
>'www.14-condoms.co.uk', 'pinky.notnet.co', '172.186.167.179', 'GET',
>NULL, '/board.html', 200, 21344, '',
>'http://www.google.com/search?q=durex+condoms+and+advertising=en=10=N',
>NULL, 'Mozilla/4.0 (compatible; MSIE 5.5; Windows 95)', 2, 0, 0, 0, 0)
>---
>
>umm, why?
>The field is quoted, so why is it doing that?
>Does a & denote a variable of some kind?
>
>Can anyone shed any light, and offer a solutions?
>
>Cheers
>Mike Williams
>notnet Webhosting
>http://www.notnet.co.uk
-- Thomas Kyte (tkyte@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 Sun Feb 03 2002 - 15:24:32 CST