RE: Newline inserted?
am 24.10.2005 20:04:45 von ted.behlingI think you need to remove the semicolon at the end of the line.
> -----Original Message-----
> From: Ward.P.Fontenot@wellsfargo.com
> [mailto:Ward.P.Fontenot@wellsfargo.com]
> Sent: Monday, October 24, 2005 2:01 PM
> To: dbi-users@perl.org
> Subject: Newline inserted?
>=20
>=20
> I have the following sql insert statement in a file:
>=20
> 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=3D0)','H4vgmf+OJsT99kCfQuIpALY7k9k=3D');
>=20
> When I attempt to load this file into Oracle 10g using the=20
> DBI I get the
> following error:
>=20
> DBD::Oracle::st execute failed: ORA-00911: invalid character=20
> (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_uni x)[3638]:
> session opened for user oracle by
> root(uid=3D0)','H4vgmf+OJsT99kCfQuIpALY7k9k=3D')<*>;')
>=20
> This is the code that loads this file:
>=20
> while (
> chomp;
> $sql =3D qq{$_};
>=20
> $sth =3D $dbh->prepare($sql); # Should these be outside the =
loop?
> $sth->execute();
> }
>=20
> Od -cx FILENAME shows a "\n" character at the <*> point in=20
> the above file.
> VI -b does not. Is this a known issue with DBI and 10g or am=20
> I overlooking
> something?
>=20
>=20
> Paul Fontenot
> WFS - CAST Operations
> Email: ward.p.fontenot@wellsfargo.com
> Phone: (480) 437-7795
>=20
> This message may contain confidential and/or privileged=20
> information. If you
> are not the addressee or authorized to receive this for the=20
> addressee, you
> must not use, copy, disclose, or take any action based on=20
> this message or
> any information herein. If you have received this message in=20
> error, please
> advise the sender immediately by reply e-mail and delete this message.
> Thank you for your cooperation.
>=20