Empty Contents Tab in SQuirreL when Column-Names contain dashes

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Empty Contents Tab in SQuirreL when Column-Names contain dashes

Thomas Lenarz
Hello,

we experience the problem that the contents tab in SQuirreL stays blank,
if a table contains columns whose names contain non standard characters.

For example column-name test-1. The dash is an invalid character.
For most databases this situation is solved by surrounding the
column-name by quotes as in "test-1".

By analysing the problem and looking into the log files I discovered
that SQuirreL actually
generates a SELECT-Statement without surrounding the column-name(s) by
quotes if the column-names contain invalid characters. That is why the
contents-tab does not show any data.

The problem can be reproduced easily using the following steps (in my
case with HSQL-DB):

create table test ( "test-1" char(10) )
insert into test values ('1111111111')

SELECT test-1 FROM "PUBLIC"."TEST"; --> won't work (which is correct)

SELECT "test-1" FROM "PUBLIC"."TEST" --> will work

Contents-Tab stays empty.

I consider this a bug in SQuirreL. It should double-quote columns
containing invalid characters when generating
the SELECT-Statement for the contents tab.

Your opinion about this? Is there a chance to get this changed in SQuirreL?

Thanks a lot,
Thomas

--
mailto:[hidden email]
http://twitter.com/tommesl


------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Squirrel-sql-develop mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/squirrel-sql-develop