create table arun.test1("a b" int);
and was able to access the row when I use double quotes. Is this ok?
If there are information regarding how and why it can happen please
link them in the reply. Is this a codepage issue?
Yes, but I would advise against it. Normally db2 stores identifiers such
as tablenames in upper case, and also transforms them to uppercase when
used in queries. But if you quote an identifier with double quotes, it
is stored as is in the catalog. Example:
create table arun.test1("ab" int);
select * from arun.test1 where ab = 3
SQL0206N "AB" is not valid in the context where it is used. SQLSTATE=42703
select * from arun.test1 where "ab" = 3
ab
-----------
0 record(s) selected.
/Lennart
Cheers
Serge
--
Serge Rielau
SQL Architect DB2 for LUW, IBM Toronto Lab
Blog: tinyurl.com/SQLTips4DB2
Wiki: tinyurl.com/Oracle2DB2Wiki
Twitter: srielau
> Not all features that are legal are encouraged....
That also applies to names with apostrophes. O'Grady drives me nuts!
--
Will Honea
There are bad SQL programmers who use this feature to do display
formatting in the database. When someone does this, it is a symptom of
other bad code. They do not understand how a tiered architecture
works.
This was the explanation I was looking forward to. Thanks Joe.