Login or Sign up Help | Site Map
Connecting Tech Pros Worldwide

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

Question posted by: Frank Swarbrick (Guest) on July 2nd, 2008 04:15 PM
>>On 6/30/2008 at 12:23 PM, in message
<ee1702e5-781a-469a-ae19-f70eb4c8fad2@u36g2000prf.googlegroups.com>,
machineghost<machineghost@gmail.comwrote:
Quote:
Originally Posted by
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

Would you like to answer this question?
Sign up for a free account, or Login (if you're already a member).
Marcin 'frodo2000' Molak's Avatar
Marcin 'frodo2000' Molak
Guest
n/a Posts
July 3rd, 2008
11:15 AM
#2

Re: Re: Migrated From v7 => v9 ... and Now Can't Use Semi-Colons inStrings?
On 2 Lip, 18:07, "Frank Swarbrick" <Frank.Swarbr...@efirstbank.com>
wrote:
Quote:
Originally Posted by
Quote:
Originally Posted by
Quote:
Originally Posted by
>On 6/30/2008 at 12:23 PM, in message

>
<ee1702e5-781a-469a-ae19-f70eb4c8f...@u36g2000prf.googlegroups.com>,
>
>
>
machineghost<machinegh...@gmail.comwrote:
Quote:
Originally Posted by
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'

>
Quote:
Originally Posted by
And now that I have a solution, I can summarize this entire issue (for
anyone who later reads this thread) as ...

>
Quote:
Originally Posted by
*** Problem ***
INSERT INTO fakeTable (fakeColumn) VALUES (';
');

>
Quote:
Originally Posted by
results in the following (incorrect) error:

>
Quote:
Originally Posted by
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 =')

>
Quote:
Originally Posted by
*** SOLUTION ***
INSERT INTO faketable(fakecolumn) VALUES (';' || '
');

>
Quote:
Originally Posted by
results in the following (correct) error (unless you really do have a
table called "fakeTable"):

>
Quote:
Originally Posted by
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

>
Quote:
Originally Posted by
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

 
Not the answer you were looking for? Post your question . . .
183,906 Experts ready to help you find a solution.
Sign up for a free account, or Login (if you're already a member).

Latest Articles: Read & Comment
  • Didn't find the answer you were looking for?
    Post Your Question
  • Top Community Contributors