AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Problem with table name

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java and Databases
View previous topic :: View next topic  
Author Message
none
Guest





PostPosted: Fri Aug 11, 2006 4:30 pm    Post subject: Problem with table name Reply with quote



Hi!

I have a problem to access tables in an Informix Database. Table names
are something like that :
informix.pv_tvvte

When I try a "SELECT informix.pv_tvvte.numero_vente FROM
informix.pv_tvvte WHERE informix.pv_tvvte.numero_vente=#value#", (I use
ibatis and spring) I get a syntax error exception (SQLException "Bad SQL
Grammar").

If I replace dot with "_" in the name, I get a "Table Not Found" Exception.

How could I escape the dot in the tables names ?

TIA

Arnaud
Back to top
Lee Fesperman
Guest





PostPosted: Sun Aug 13, 2006 6:32 am    Post subject: Re: Problem with table name Reply with quote



none wrote:
Quote:

Hi!

I have a problem to access tables in an Informix Database. Table names
are something like that :
informix.pv_tvvte

When I try a "SELECT informix.pv_tvvte.numero_vente FROM
informix.pv_tvvte WHERE informix.pv_tvvte.numero_vente=#value#", (I use
ibatis and spring) I get a syntax error exception (SQLException "Bad SQL
Grammar").

How could I escape the dot in the tables names ?

The normal solution is to use name delimiters. They surround the name and allow you to
use names that contain embedded special characters and are reserved words. For SQL92,
you use double quotes ("); can't tell you what Informix takes.

--
Lee Fesperman, FFE Software, Inc. (http://www.firstsql.com)
==============================================================
* The Ultimate DBMS is here!
* FirstSQL/J Object/Relational DBMS (http://www.firstsql.com)
Back to top
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java and Databases All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.