Ask a Question related to IBM DB2, Design and Development.
-
xixi #1
how to execute the query with special character
hello, i am using command window on db2 udb v8.1 on windows to query a
table with field name like this select abc\ from table, but i get the
error \ is invalid, so how to let the db2 accept it? thanks
xixi Guest
-
MX 7 and CGI special character problem
The umlauts have stopped working in our application since upgrading to Coldfusion MX 7 and Apache 2.0.43. A html form is sent to coldfusion. A... -
how to query a column name with special character
i was able to create a table with a column name abc\ on db2 v8.1 on windows, but when i do the query select abc\ from table, i get error '\' is... -
Special Character search lik
How did u insert mycafé in database ?? Use same client settings which u used for insert. Hope this helps. ( Else post ur settings or method to... -
Special character for SM?
Hi all, I need to insert the character "SM", similar to special character "TM". Is there a keystroke for this like TM? Would rather use htm text... -
I need a special character....
The a in Mangels need an umlaut, please. Eleanor -
P. Saint-Jacques #2
Re: how to execute the query with special character
Try putting your command in quotes:
db2 "select abc\ from table....."
On the other hand, are you trying to get a
"select col1 from table where col1='abc\'"
Is your col really called abc\ ???
HTH, Pierre.
PS: I think it treats the \ as an escape char.
xixi wrote:> hello, i am using command window on db2 udb v8.1 on windows to query a
> table with field name like this select abc\ from table, but i get the
> error \ is invalid, so how to let the db2 accept it? thanksP. Saint-Jacques Guest
-
Ian #3
Re: how to execute the query with special character
xixi wrote:
You need to enclose your column names with quotes:> hello, i am using command window on db2 udb v8.1 on windows to query a
> table with field name like this select abc\ from table, but i get the
> error \ is invalid, so how to let the db2 accept it? thanks
C:\>db2 -tvf test.sql
create table t1 ( "abc\" int, "cde" char(5) )
DB20000I The SQL command completed successfully.
insert into t1 values (1,'Row 1'), (2, 'Row 2')
DB20000I The SQL command completed successfully.
select "abc\" from t1
abc\
-----------
1
2
2 record(s) selected.
select * from t1 where "abc\" = 1
abc\ cde
----------- -----
1 Row 1
1 record(s) selected.
Good luck,
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
[url]http://www.newsfeeds.com[/url] - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
Ian Guest
-
PM \(pm3iinc-nospam\) #4
Re: how to execute the query with special character
This post is being sent with unicode encoding UTF-8 setting in my news
reader program.
You should be able to see chars a i see them.
This is not an answer, just a few possibly useful infos...
What are your windows regional settings? (what and how many languages are
installed?)
What code pages are installed on windows?
Is your source code saved in unicode? (wordpad, save as unicode, ...)
When you do CHCP on a windows command promp (cmd.exe), what does it say?
(chcp=change code page)
What are the db cscp settings? (Get DB Cfg)
Database territory
Database code page
Database code set
Database country/region code
Depending on what settings you use, you may see different chars.032-039 !"#$%&'>type source.txt
040-049 ()*+,-./012
130-139 éâÂà¶çêëèï
Page de codes active : 850>chcp
Page de codes active¦: 1250>chcp 1250
032-039 !"#$%&'>type source.txt
040-049 ()*+,-./012
130-139 ???aa?e?ei
Page de codes active : 863>chcp 863
032-039 !"#$%&'>type unicode-source.txt
040-049 ()*+,-./012
130-139 éâaàaçêëèï
Here, it begins with cscp 1252
I:\DB2USR\TEST>DB2 CREATE TABLE "DBOXA"."TTé" (COL1 INT)
DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0007N The character "é" following "REATE TABLE DBOXA.TT" is not valid.
SQLSTATE=42601
I:\DB2USR\TEST>CHCP 850
Page de codes active : 850
I:\DB2USR\TEST>DB2 CREATE TABLE "DBOXA"."TTé" (COL1 INT)
DB20000I The SQL command completed successfully.
Save your source code as unicode.
s2.executeUpdate ("insert into DBOXA.TTé (COL1) values (5)");
When you edit, switch to the right locale.
I do it using the alt-shift key combination because i have set it this way
in the regional settings.
You should also refer to the doc section called
Reference - SQL - Language Elements
Base url : [url]http://publib.boulder.ibm.com/infocenter/db2help/index.jsp[/url]
PM
"xixi" <dai_xi@yahoo.com> a écrit dans le message de
news:c0f33a17.0309151458.3c137a9e@posting.google.c om...> hello, i am using command window on db2 udb v8.1 on windows to query a
> table with field name like this select abc\ from table, but i get the
> error \ is invalid, so how to let the db2 accept it? thanks
PM \(pm3iinc-nospam\) Guest
-
xixi #5
Re: how to execute the query with special character
actually my big problem is the fieldname with currency symbol ¥. For
example select abc¥ from table.
Database territory = JP
Database code page = 1208
Database code set = UTF-8
Database country/region code = 81
If the pc set up English locale, i have no problem to execute the
query through db2jcc.jar. But if the pc is setup Japan local, there is
always error.
xixi Guest
-
Sherman Lau #6
Re: how to execute the query with special character
Call service to open an PMR. JDK supports many Japanese conversion methods.
Some of them is syntax base and some of them is glyph base. Syntax base
conversion map yen to backslash in unicode. Glyph base conversion map yen
to yen in Unicode. Please note that yen and backslash are two different
characters. Currently JCC is using a glyph base conversion in JDK.
Sherman
"xixi" <dai_xi@yahoo.com> wrote in message
news:c0f33a17.0309161505.270b2136@posting.google.c om...> actually my big problem is the fieldname with currency symbol ¥. For
> example select abc¥ from table.
>
>
> Database territory = JP
> Database code page = 1208
> Database code set = UTF-8
> Database country/region code = 81
>
> If the pc set up English locale, i have no problem to execute the
> query through db2jcc.jar. But if the pc is setup Japan local, there is
> always error.
Sherman Lau Guest



Reply With Quote

