|
|
Choosing A Webhost: |
Re: Select statement only possible using double quotes?: msg#00022db.squirrel-sql.users
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. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Anything to do about timed-out sessions with oracle?, Karr, David |
|---|---|
| Next by Date: | Select statement only possible using double quotes?, Bjoern Sundin |
| Previous by Thread: | Select statement only possible using double quotes?, Bjoern Sundin |
| Next by Thread: | Strange conversions when doing calculations with Oracle, CptBlaubaer |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |