It seems that this isn't a direct issue for the Squirrel SQL Client but
merely has to do with the Derby DB and tables generated by hibernate. In my
case the database is generated by Eclipse Teneo in runtime. Testing with a
database directly created in Squirrel SQL Client (as proposed by Robert
Manning) doesn't reproduce the problem.
I found following link on the java.sun forum describing a similar problem:
http://forum.java.sun.com/thread.jspa?threadID=5116373&tstart=105
http://forum.java.sun.com/thread.jspa?threadID=5116373&tstart=105
[quote]
Derby needs column and table names to be quoted. There appears to be no
developer control over the EntityManager's production of native SQL, but
developers can use the EJB's @Table and @Column annotations to specify table
and column names. When Netbeans produces an EJB from a database schema
Netbeans writes these in the format:
@Table(name = "myTable")
@Column(name = "Forename")
When the database is Derby, and therefore requires quoted table and column
names, the developer must rewrite the annotations as:
@Table(name = "\"myTable\"")
@Column(name = "\"Forename\"")
[unquote]
It doesn't really solve anything for me, but it might anyway shed some light
into this problem.
Bjoern
Bjoern Sundin wrote:
>
> When executing SQL statements in Squirrel 2.4 I get an error if the user,
> table and/or field isn't surrounded by double quotes.
>
> Example (lsa is a table):
>
> SELECT "lsa"."name" FROM "lsa" --> works
>
> SELECT lsa.name FROM lsa --> returns following error: Error:
> java.sql.SQLException: Schema 'lsa' does not exist, SQL State: 42Y07,
> Error Code: 30000
>
> also SELECT * FROM lsa returns this error
>
> I'm using Java 1.6 with the Derby database embedded driver.
>
> In the tutorials and help no double quotes are used and I find it very
> inconvenient to have to add quotes to the autocompleted names composing a
> query.
>
> Is there any setting that I can use or any other solution to handle this?
>
> Thanks in advance!
> Bjoern
>
>
--
View this message in context: http://www.nabble.com/Select-statement-only-possible-using-double-quotes--tf3013596.html#a8374311
Sent from the squirrel-sql-users mailing list archive at Nabble.com.
|