Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

Re: Select statement only possible using double quotes?: msg#00022

db.squirrel-sql.users

Subject: Re: Select statement only possible using double quotes?


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>
Google Custom Search

Recently Viewed:
hardware.arm.at...    cms.citadel.dev...    video.gstreamer...    java.facelets.u...    misc.basics.qna...    web.wiki.instik...    network.uip.use...    xdg.devel/2003-...    tex.bibtex.bibd...    finance.quotesp...    ietf.zeroconf/2...    redhat.blinux.g...    suse.db2/2003-0...    php.phpesp/2004...    uml.devel/2003-...    gnome.labyrinth...    qnx.openqnx.dev...    boot-loaders.gr...    db.dataperfect....    audio.audacity....    linux.uclinux.m...    editors.j.devel...    os.openbsd.tech...    kde.users.multi...   
Home | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive 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

Navigation