 |
AppletTalk.com Java discussions newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
none Guest
|
Posted: Fri Aug 11, 2006 4:30 pm Post subject: Problem with table name |
|
|
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
|
Posted: Sun Aug 13, 2006 6:32 am Post subject: Re: Problem with table name |
|
|
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 |
|
 |
|
|
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
|
|