0

I am currently using the IBM DB2 CLPPlus utility, and I don't know how to put double quotes into a string ? Because if I try to escape them or if I double the doubles quotes it doesn't work:

Escaped double quotes :

[i1058@lat111 ~]$ cat outfile
1,"te\"st","ab\"cd"

SQL> IMPORT FROM 'outfile' INSERT INTO USER1.TABLE3;
[jcc][10143][10845][3.69.66] Invalid parameter 3: Parameter is not set nor registered. ERRORCODE=-4461, SQLSTATE=42815

Double double quotes :

[i1058@lat111 ~]$ cat outfile
1,"te""st","ab""cd"

SQL> IMPORT FROM 'outfile' INSERT INTO USER1.TABLE3;
Number of Rows Inserted:1
SQL> SELECT * FROM USER1.TABLE3;                    

COL1        COL2                 COL3                
----------- -------------------- --------------------
          1 test                 abcd            

For this second case, there is no error when importing data, but the double quotes don't appear in the SELECT statement.

Note these data for the second case are perfectly loadable (I can see double quotes in a SELECT statement) with the DB2 CLI utility and the 'LOAD FROM "outfile" OF DEL INSERT INTO USER1.TABLE3' statement, but for my needs I have to use CLPPlus utility.

Maybe there is an option in CLPPlus in order to do this ?

Thanks and regards.

Steph
  • 47
  • 1
  • 8
  • I would suggest that you open a PMR with IBM for this issue and/or a [request for enhancement](https://www.ibm.com/developerworks/rfe/execute?use_case=changeRequestLanding&BRAND_ID=184&PROD_ID=1172#results). – Ian Bjorhovde Jan 30 '17 at 00:31
  • Okay thanks for your answer. Unfortunately we are developers and not IBM client or IBMer (we develop a product for IBM, so we are just IBM vendor), and in such a case we cannot open a PMR. Do you have any idea to open such a PMR ? – Steph Jan 30 '17 at 11:11

0 Answers0