Gerd,

That is awesome!  I look forward to seeing that change come down the pipe.

> "Introduced a new general data type property 'Use column labels instead
of column names in result headers'.

Just thinking out loud... does it make sense to leave this config option in the user's hands, or could this automatically switch depending on which driver you're on?  If you had two db connections open for databases that handle the table alias differently, then the setting would apply to both sessions (possibly incorrectly).

Either way i'm happy w/the fix!

Eric



From:        Gerd Wagner <gerdhwagner@t-online.de>
To:        epierce@wernervas.com
Cc:        squirrel-sql-users@lists.sourceforge.net
Date:        09/24/2010 06:37 PM
Subject:        Re: [Squirrel-sql-users] column aliases in MySQL




Am 24.09.2010 21:51, schrieb epierce@wernervas.com:
> Has anyone else noticed that when querying a MySQL db a field alias
> doesn't correctly show up in the query result header?
>
> For example:
> SELECT p.name AS productName, c.name AS customerName
> FROM product p
> JOIN customer c ON p.custID = c.custID
> WHERE (whatever)
>
> The result headers will show 'name' for both fields instead of the field
> alias set in the query.
>
> FYI. I also use SquirrelSQL with an Informix db and it does not exhibit
> this issue.

This is a JDBC driver dependent issue. Some drivers return aliases as
column names others as labels. I just made it switchable. See change log
entry cited below:

"Introduced a new general data type property 'Use column labels instead
of column names in result headers'.
See Global Preferences --> Tab 'Data Type Controls'. Will be useful e.g.
for MySQL if Aliases are used in Select clauses."


or here

http://squirrel-sql.svn.sourceforge.net/viewvc/squirrel-sql/trunk/sql12/doc/src/main/resources/changes.txt?revision=5900


The change is available in our SVN repository and in coming versions and
snapshots


Gerd