Subject | Re: [firebird-support] Re: Column unknown error |
---|---|
Author | Ann W. Harrison |
Post date | 2007-01-29T15:53:26Z |
mikcaau wrote:
CREATE TABLE StockHolders (... sh_Name1...)
or this:
CREATE TABLE STOCKHOLDERS (... SH_NAME1...)
All these statements will work
select sh_name1 from stockholders
select sh_Name1 from StockHolders
select SH_NAME1 from STOCKHOLDERS
select sH_nAmE1 from sToCkHoLdErS
select "SH_NAME1" from "STOCKHOLDERS"
If you defined the table like this:
CREATE TABLE "STOCKHOLDERS" (... "SH_NAME1" ...)
only this
CREATE TABLE STOCKHOLDERS (... SH_NAME1...)
or this
CREATE TABLE "STOCKHOLDERS" (... "SH_NAME1"...)
will work. The magic of delimited identifiers
Regards,
Ann
>>That's not exactly correct. If you defined the table like this
>> If I do the following query I get an error trying to return a
>> dataset. (sh_Name1 is a valid column in the STOCKHOLDERS table)
>> SELECT sh_Name1 FROM STOCKHOLDERS
>>
>> SQL error code = -206
>> Column unknown
>> SH_STOCKHOLDERID
>> No message for error code 336397208 found.
>>
>>
> Is the column name in mixed case? If so you will need to quote your
> column names.
>
CREATE TABLE StockHolders (... sh_Name1...)
or this:
CREATE TABLE STOCKHOLDERS (... SH_NAME1...)
All these statements will work
select sh_name1 from stockholders
select sh_Name1 from StockHolders
select SH_NAME1 from STOCKHOLDERS
select sH_nAmE1 from sToCkHoLdErS
select "SH_NAME1" from "STOCKHOLDERS"
If you defined the table like this:
CREATE TABLE "STOCKHOLDERS" (... "SH_NAME1" ...)
only this
CREATE TABLE STOCKHOLDERS (... SH_NAME1...)
or this
CREATE TABLE "STOCKHOLDERS" (... "SH_NAME1"...)
will work. The magic of delimited identifiers
Regards,
Ann