Hi Gurus,
I have DBI and DBD with Oracle on HP-UX. I am facing some problem in
updating a table with data that has special characters, my database is
having NLS character set enabled.
I have a table which has the following data(the datatype of the columns
are:
name NVARCHAR2,
fmly_id NUMBER,
id NCHAR )
SQL> select name,fmly_id from supplier where id=n'20037026';
NAME
FMLY_ID
----------------------------------- ----------
TRADOC DOCUMEWTA AO E SERVI OS 126908
SQL>
The above data got inserted in the above table through a Perl Script,
which read an XML formatted file and then inserted the data through DBI
methods. I think there is some special character in the name column. You
can see a "space" between
"DOCUMEWTA" and "AO" and between "SERVI" and "OS".
Then I run another Perl script, which extract data from the above table,
stores it is Perl variables and then frame query and then execute it.
update fmly set HQ_SRS_ID = N'20037026',HQ_SRS_NAME = N'TRADOC
DOCUMEWTAAO E SERVIOS' where fmly_id = 126908
(The datatypes of the table fmly are:
hq_srs_id NCHAR,
hq_srs_name NVARCHAR2,
fmly_id NUMBER)
You can see that in the above query, the "space" between "DOCUMEWTA" and
"AO", between "SERVI" and "OS" are not there., as it was there in the
SQLPLUS prompt. Then when I execute the above command, I get the
following error.
DBD::Oracle::db prepare failed: ORA-01756: quoted string not properly
terminated (DBD ERROR: OCIStmtPrepare)
I am unable to find out why the error is coming, do I need to set some
paramete in the Perl script before executing the script.
Please let me know your valuable suggestions/help.
Thanks,
Nilanjan