By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,389 Members | 1,989 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,389 IT Pros & Developers. It's quick & easy.

Re: Migrated From v7 => v9 ... and Now Can't Use Semi-Colons inStrings?

P: n/a
>>On 6/30/2008 at 12:23 PM, in message
<ee**********************************@u36g2000prf. googlegroups.com>,
machineghost<ma**********@gmail.comwrote:
Just to clarify (for anyone else as clueless as me), the hexcode
character entity stuff isn't actually necessary at all. In fact, the
actual solution to this problem is so mind-numbingly simple I feel
idiotic for not realizing it sooner; just replace:
';\n'
with:
';' || '\n'

And now that I have a solution, I can summarize this entire issue (for
anyone who later reads this thread) as ...

*** Problem ***
INSERT INTO fakeTable (fakeColumn) VALUES (';
');

results in the following (incorrect) error:

db2 =INSERT INTO fakeTable (fakeColumn) VALUES (';
DB21034E The command was processed as an SQL statement because it was
not a
valid Command Line Processor command. During SQL processing it
returned:
SQL0010N The string constant beginning with "'" does not have an
ending
string delimiter. SQLSTATE=42603
db2 =')
*** SOLUTION ***
INSERT INTO faketable(fakecolumn) VALUES (';' || '
');

results in the following (correct) error (unless you really do have a
table called "fakeTable"):

db2 =insert into faketable(fakecolumn) values (';' || '
db2 (cont.) =');
DB21034E The command was processed as an SQL statement because it was
not a
valid Command Line Processor command. During SQL processing it
returned:
SQL0204N "DB2INST1.FAKETABLE" is an undefined name. SQLSTATE=42704

WOO HOO!
Did you do something special to get this "(cont.)" result? I get the same
thing you were getting with your original method:

db2 =INSERT INTO faketable(fakecolumn) VALUES (';' || '
DB21034E The command was processed as an SQL statement because it was not
a
valid Command Line Processor command. During SQL processing it returned:
SQL0010N The string constant beginning with "'" does not have an ending
string delimiter. SQLSTATE=42603

Are you using a scripting language to drive the CLP somehow? I was just
typing directly into the CLP.

Just wondering...

Frank

Jul 2 '08 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On 2 Lip, 18:07, "Frank Swarbrick" <Frank.Swarbr...@efirstbank.com>
wrote:
>On 6/30/2008 at 12:23 PM, in message

<ee1702e5-781a-469a-ae19-f70eb4c8f...@u36g2000prf.googlegroups.com>,

machineghost<machinegh...@gmail.comwrote:
Just to clarify (for anyone else as clueless as me), the hexcode
character entity stuff isn't actually necessary at all. *In fact, the
actual solution to this problem is so mind-numbingly simple I feel
idiotic for not realizing it sooner; just replace:
';\n'
with:
';' || '\n'
And now that I have a solution, I can summarize this entire issue (for
anyone who later reads this thread) as ...
*** Problem ***
INSERT INTO fakeTable (fakeColumn) VALUES (';
');
results in the following (incorrect) error:
db2 =INSERT INTO fakeTable (fakeColumn) VALUES (';
DB21034E *The command was processed as an SQL statement because it was
not a
valid Command Line Processor command. *During SQL processing it
returned:
SQL0010N *The string constant beginning with "'" does not have an
ending
string delimiter. *SQLSTATE=42603
db2 =')
*** SOLUTION ***
INSERT INTO faketable(fakecolumn) VALUES (';' || '
');
results in the following (correct) error (unless you really do have a
table called "fakeTable"):
db2 =insert into faketable(fakecolumn) values (';' || '
db2 (cont.) =');
DB21034E *The command was processed as an SQL statement because it was
not a
valid Command Line Processor command. *During SQL processing it
returned:
SQL0204N *"DB2INST1.FAKETABLE" is an undefined name. *SQLSTATE=42704
WOO HOO!

Did you do something special to get this "(cont.)" result? *I get the same
thing you were getting with your original method:

db2 =INSERT INTO faketable(fakecolumn) VALUES (';' || '
DB21034E *The command was processed as an SQL statement because it was not
a
valid Command Line Processor command. *During SQL processing it returned:
SQL0010N *The string constant beginning with "'" does not have an ending
string delimiter. *SQLSTATE=42603

Are you using a scripting language to drive the CLP somehow? *I was just
typing directly into the CLP.

Just wondering...

Frank
Hi,

I have successfully put string with semicolon into table in DB2 9.5
environment. Could you put whole insert command, cause you copy one
without end ')

Marcin
Jul 3 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.