RE: Newline inserted?



I think you need to remove the semicolon at the end of the line.

> -----Original Message-----
> From: Ward.P.Fontenot@xxxxxxxxxxxxxx
> [mailto:Ward.P.Fontenot@xxxxxxxxxxxxxx]
> Sent: Monday, October 24, 2005 2:01 PM
> To: dbi-users@xxxxxxxx
> Subject: Newline inserted?
>
>
> I have the following sql insert statement in a file:
>
> INSERT INTO message(FULLDATE,HOSTNAME,FACILITY,PRIORITY,MESSAGE,SHA1)
> VALUES('2005-Oct-18 11:53:21','pkitest.wellsfargo.com','auth
> ','info','su(pam_unix)[3638]: session opened for user oracle by
> root(uid=0)','H4vgmf+OJsT99kCfQuIpALY7k9k=');
>
> When I attempt to load this file into Oracle 10g using the
> DBI I get the
> following error:
>
> DBD::Oracle::st execute failed: ORA-00911: invalid character
> (DBD ERROR:
> error possibly near <*> indicator at char 238 in 'INSERT INTO
> message(FULLDATE,HOSTNAME,FACILITY,PRIORITY,MESSAGE,SHA1)
> VALUES('2005-Oct-18
> 11:53:21','pkitest.wellsfargo.com','auth','info','su(pam_unix)[3638]:
> session opened for user oracle by
> root(uid=0)','H4vgmf+OJsT99kCfQuIpALY7k9k=')<*>;')
>
> This is the code that loads this file:
>
> while (<SQL>) {
> chomp;
> $sql = qq{$_};
>
> $sth = $dbh->prepare($sql); # Should these be outside the loop?
> $sth->execute();
> }
>
> Od -cx FILENAME shows a "\n" character at the <*> point in
> the above file.
> VI -b does not. Is this a known issue with DBI and 10g or am
> I overlooking
> something?
>
>
> Paul Fontenot
> WFS - CAST Operations
> Email: ward.p.fontenot@xxxxxxxxxxxxxx
> Phone: (480) 437-7795
>
> This message may contain confidential and/or privileged
> information. If you
> are not the addressee or authorized to receive this for the
> addressee, you
> must not use, copy, disclose, or take any action based on
> this message or
> any information herein. If you have received this message in
> error, please
> advise the sender immediately by reply e-mail and delete this message.
> Thank you for your cooperation.
>
.



Relevant Pages