Subject Re: [IB-Conversions] problem with sql2gdb
Author Helen Borrie
At 12:51 AM 19-11-00 +0000, you wrote:
>I tryed to convert my .mdb to interbase's .sql with sql2gdb but all
>the INSERT's I got are as abobe:
>
>INSERT INTO "mytable" (
> "field1",
> "field2",
> "field3",
>) VALUES (
> :"field1",
> :"field2",
> :"field3",
>)
>;
>
>That ist, I don't get the values but only the names preceding of ':'.

Unless you want your column names to be case-sensitive, or you want to use
reserved words as column names, avoid the quotes when you define the
columns in your metadata.

In IB 6, double-quotes are not legal syntax for delimiting values.

In the example above, you have mixed two syntax errors on the values, if
you were trying to load this interactively. The colon markers are for
parameters - you won't be able to do it this way unless you have a client
program which will pass the parameter values dynamically. (The free
IB_WISQL tool at www.ibobjects.com lets you feed parameters into dynamic
SQL statements).

The interactive version of this statement would be:
INSERT INTO mytable (
field1,
field2,
field3 /* remove this comma ----> , <----------- */
)
VALUES (
'value1', /* if value1 is a string */
value2,
value3 /* remove this comma ----> , <----------- */
)
;

If you have made your column names case-sensitive, then you are stuck with
putting them around the field list to avoid having InterBase store them as
uppercase.

hth

Helen


All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
___________________________________________________