wood burning stoves 2.0*
The moose likes JDBC and the fly likes Column name too wide Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Column name too wide" Watch "Column name too wide" New topic
Author

Column name too wide

Mel Calvin
Greenhorn

Joined: Sep 11, 2007
Posts: 9
Hi,
If I have a sql query that looks like this:

and result is returned as a collection of dynabeans. When I want to retrieve the data from the updated_date column I need to write like this:

with the "column name" truncated down to 32 chars, else it won't work. Now, this isn't an elegant solution. Anyone have better solution for this?

Thanks.
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Could you not alias the columns in your result set? i.e.:


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Mel Calvin
Greenhorn

Joined: Sep 11, 2007
Posts: 9
Aah.. I knew there was a SQL-side solution to this. My SQL skills are limited, thanks for the help!
 
wood burning stoves
 
subject: Column name too wide
 
Similar Threads
DB2 Date format to Oracle Date format?
Incorrect Colum/Size Error while converting from java to excel
Unable to fetch records by using 'where' clause for a date type field in sql
Query giving me two different results
Default Date format issue in ojdbc6