Subject Re: [IBO] Re: invalid insert: no columns
Author Helen Borrie
At 02:04 PM 26/02/2003 +0000, you wrote:

>YES! the fault was with my quoting - removed quotes from fields and
>table and everything worked as expected. Thanks v much.
>
>cant remember why i started quoting everything - possibly because my
>previous project has mixed case field names. what is the rule for
>quoting? i know i have to quote field names that conflict with a
>reserved word, not where wle it's needed.

Well, yes, you do - but they have to be *defined* with quotes.
Unquoted identifiers are always case-insensitive. Quoted ones are always
case-sensitive. You can leave the quotes off identifiers that have been
defined as quoted, only provided they were defined in upper case AND the
identifier doesn't break the symbol rules.

so you can have
CREATE TABLE "PEANUTS" (
"NUT_ID" integer,
"NUT_FLAVOUR" varchar(40),
"SUPPLY SOURCE" integer);

and you can do

SELECT NUT_ID, NUT_FLAVOUR,
"SUPPLY SOURCE"
FROM PEANUTS

but you can't do
SELECT Nut_ID, Nut_Flavour, SUPPLY SOURCE
from Peanuts

etc. etc.

>thanks for the TIB_MonitorDialog tip, will keep that in mind.
>
>FYI, the message i got didn't come fromthe server - it looked like
>it was generated by IBO while it was bulding the field list for the
>insert statement.

Yes, it would be raised during the parsing phase.

Helen