>>On 6/27/2008 at 7:00 PM, in message
<fe715a94-6138-4934-9ff7-aa4e4d2f5e7e@c1 9g2000prf.googl egroups.com>,
machineghost<ma chineghost@gmai l.comwrote:
Not to be offensive, but...did you try it?
values 'opt1' CONCAT X'3B' CONCAT 'opt2' CONCAT X'3B' CONCAT 'opt3';
returns:
1
--------------
opt1;opt2;opt3
1 record(s) selected.
3B is hex for the semicolon character. CONCAT concatenates the string to
the left of it with the string to the right.
I haven't been following carefully, but I Think you said you wanted a string
followed by a semicolon, a CRLF and then another string?
So how about...
values 'string1' CONCAT x'3b0d0a' CONCAT 'string2';
1
-----------------
string1;
string2
1 record(s) selected.
(Note, values is used just to display back the results, it's not part of the
expression itself.)
Frank
<fe715a94-6138-4934-9ff7-aa4e4d2f5e7e@c1 9g2000prf.googl egroups.com>,
machineghost<ma chineghost@gmai l.comwrote:
One last shot in the dark before I give up (for real this time ;-) ).
I stumbled upon this link when I went to lookup the syntax for
switching the termination character:
>
In it, a guy claims that he was able to escape semi-colons (which
evidently gave him trouble even without a newline) by using this:
'opt1' CONCAT X'3B' CONCAT 'opt2' CONCAT X'3B' CONCAT 'opt3'
>
However as I've said I'm no DBA, and neither myself nor anyone else in
my office has the foggiest idea what the above does or even is (I
*think* it's either a crazy statement with syntax I don't know, or
some sort of string that can be passed to DB2 via a special command
line call to set environmental variables or something). I tried
Googling it but foudn nothing (besides the above link and something in
Spanish), and I'm sort of afraid to just run random code (even on our
test database). So, does anyone here:
A) know what that does?
B) know if it can somehow solve this issue?
>
And thanks for the upteenth time to everyone who has responded; I
really wish I could devote more time to working on this with IBM so
that I could give y'all a more satisfying resolution.
I stumbled upon this link when I went to lookup the syntax for
switching the termination character:
>
In it, a guy claims that he was able to escape semi-colons (which
evidently gave him trouble even without a newline) by using this:
'opt1' CONCAT X'3B' CONCAT 'opt2' CONCAT X'3B' CONCAT 'opt3'
>
However as I've said I'm no DBA, and neither myself nor anyone else in
my office has the foggiest idea what the above does or even is (I
*think* it's either a crazy statement with syntax I don't know, or
some sort of string that can be passed to DB2 via a special command
line call to set environmental variables or something). I tried
Googling it but foudn nothing (besides the above link and something in
Spanish), and I'm sort of afraid to just run random code (even on our
test database). So, does anyone here:
A) know what that does?
B) know if it can somehow solve this issue?
>
And thanks for the upteenth time to everyone who has responded; I
really wish I could devote more time to working on this with IBM so
that I could give y'all a more satisfying resolution.
values 'opt1' CONCAT X'3B' CONCAT 'opt2' CONCAT X'3B' CONCAT 'opt3';
returns:
1
--------------
opt1;opt2;opt3
1 record(s) selected.
3B is hex for the semicolon character. CONCAT concatenates the string to
the left of it with the string to the right.
I haven't been following carefully, but I Think you said you wanted a string
followed by a semicolon, a CRLF and then another string?
So how about...
values 'string1' CONCAT x'3b0d0a' CONCAT 'string2';
1
-----------------
string1;
string2
1 record(s) selected.
(Note, values is used just to display back the results, it's not part of the
expression itself.)
Frank