?
Solved

howto use mixed case names for tables and columns db2 8.2

Posted on 2006-03-28
5
Medium Priority
?
855 Views
Last Modified: 2008-01-09
Hi;
I am transferring data from mysql to db2 using my own java/jdbc program. Working out ok, except for the fact that our apps use mixed-case names for tables and columns. Although my CREATE TABLE commands issued via jdbc uses mixed case for the names, db2 insists on using only upper case. (This also happens from the CLP or DB2CC, but my concern is for it to [also]work via jdbc.)

Is there a simple setting at the database level to allow mixed case?

How do I tell db2 NOT to uppercase my table and column names?

Thanks,
nat
0
Comment
Question by:natgross
  • 3
  • 2
5 Comments
 
LVL 7

Accepted Solution

by:
sachinwadhwa earned 375 total points
ID: 16318438
db2 by default change column & table names to uppercase unless you give " (quotes).

try

"db2admin"."myTable"

db2 is case insensitive (even if you specify quotes)
0
 
LVL 1

Author Comment

by:natgross
ID: 16323282
Can you please explain what you mean that it is case insensitive *even with quotes*.

Thanks
nat
0
 
LVL 7

Expert Comment

by:sachinwadhwa
ID: 16324062
if you create table with "db2admin"."myTable"

you can still access with DB2ADMIN.MYTABLE or db2admin.mytable ....

although it will display it as db2admin.myTable in control center.
0
 
LVL 1

Author Comment

by:natgross
ID: 16324260
How about the flip scenario?
If db2 has it as MYTABLE,
can I do a
      select * from "MyTable" ?
nat
0
 
LVL 1

Author Comment

by:natgross
ID: 16327166
Anyhow, let me not hold back your earned points.

Thanks;
nat
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

November 2009 Recently, a question came up in the DB2 forum regarding the date format in DB2 UDB for AS/400.  Apparently in UDB LUW (Linux/Unix/Windows), the date format is a system-wide setting, and is not controlled at the session level.  I'm n…
Recursive SQL in UDB/LUW (it really isn't that hard to do) Recursive SQL is most often used to convert columns to rows or rows to columns.  A previous article described the process of converting rows to columns.  This article will build off of th…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses
Course of the Month13 days, 20 hours left to enroll

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question