469,609 Members | 1,445 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,609 developers. It's quick & easy.

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

>>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
1 3058
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.

Similar topics

1 post views Thread by Wolfgang Keller | last post: by
2 posts views Thread by Dennis M. Marks | last post: by
13 posts views Thread by Chris Goldie | last post: by
reply views Thread by Jean-Marc Blaise | last post: by
14 posts views Thread by TT (Tom Tempelaere) | last post: by
2 posts views Thread by techiepundit | last post: by
2 posts views Thread by James Stroud | last post: by
reply views Thread by devrayhaan | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.