Re: Is "From" a legal col name.
- From: "Jan M. Nelken" <Unknown.User@xxxxxxxxxxxxxx>
- Date: Mon, 17 Apr 2006 13:16:22 -0400
aaronfude@xxxxxxxxx wrote:
Hi,
This is not really a java question, but java is my platform so I'm
here.
Is "From" a legal column name? Doesn't seem so... I get a syntax error
exception. But I've inherited a database with a From column. What can I
do?
Thanks!
Aaron Fude
It depends - mostly on database vendor. For example in DB2 it is OK to:
D:\Working>db2 create table table (select char(1), from char(1))
DB20000I The SQL command completed successfully.
D:\Working>db2 insert into table values('S','F')
DB20000I The SQL command completed successfully.
D:\Working>db2 select select,from from table table
SELECT FROM
------ ----
S F
1 record(s) selected.
Question is whether "From" column name is stored in your catalog as Uppercase F followed by lowercase r o m. If so - try quoting exactly like it is spelled:
select "From" from ....
as suggested before.
Jan M. Nelken
.
- Follow-Ups:
- Re: Is "From" a legal col name.
- From: Lee Fesperman
- Re: Is "From" a legal col name.
- References:
- Is "From" a legal col name.
- From: aaronfude
- Is "From" a legal col name.
- Prev by Date: Re: non-JDBC/ODBC interface to MySQL 4.1?
- Next by Date: Re: Is "From" a legal col name.
- Previous by thread: Re: Is "From" a legal col name.
- Next by thread: Re: Is "From" a legal col name.
- Index(es):