Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: errr, umm, variables in inserts, possible, help? :)

Re: errr, umm, variables in inserts, possible, help? :)

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: 3 Feb 2002 13:24:32 -0800
Message-ID: <a3k9qg0ppk@drn.newsguy.com>


In article <se5r5u4ou54kh6hqnac4uhsq4pl6fjmdub_at_4ax.com>, Mike says...
>
>Hey all,

its not the equal sign -- it's the ampersand &

http://technet.oracle.com/docs/products/oracle8i/doc_library/817_doc/server.817/a82950/ch3.htm#1001901

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 Corp 
Received on Sun Feb 03 2002 - 15:24:32 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US