MIDRANGE dot COM Mailing List Archive



MIDRANGE-L » February 2013

Re: Lower-case field names in SQL views



For the most part...yes. If you wrap the column names in quotes you can
create lower-case names however they will need to be referenced using the
quotes IIRC

Create view myview as select COLUMN1 as "column1"

To reference that column you would have to do SELECT "column1" FROM MYVIEW


Thanks,
Tommy Holden



From: "James H. H. Lampert" <jamesl@xxxxxxxxxxxxxxxxx>
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>,
Date: 02/26/2013 11:24 AM
Subject: Lowercase field names in SQL views
Sent by: midrange-l-bounces@xxxxxxxxxxxx



We've had a request, in connection with BIRT reports on our Wintouch
product, to have lowercase field names in our SQL views (my
understanding is that the tools provide some sort of menu of field
names, when generating SQL)

I spent about half an hour going through the source for our SQL view
generator, attempting to implement exactly that, and then, when I just
ran a test on the result, while the SQL source members did indeed have
all lowercase field names, when I then looked at the file from Squirrel
SQL, the field names still came up all-uppercase.

Is that just the nature of DB2/400?

--
JHHL





Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2013 by MIDRANGE dot COM and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available here. If you have questions about this, please contact