Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [dtp-dev] SQL statements don't work well.


Hosokawa,

Could you try the DDL with termination character? For example ';' to see if it works for you.

    CREATE TABLE test_table (
           aaa INTEGER NOT NULL,
           bbb CHAR NOT NULL
       );
   ALTER TABLE test_table ADD CONSTRAINT unq_bbb UNIQUE (bbb);


Also, I believe the dbdefinition support the so call termination character which you can query for each database and then in the DDL generation you can then append to the end of each statement.

Hope this help.

Der-Ping Chou
Information Management Tooling
Development Manager - Data Tools
Seattle IBM Office
tel : 1-206-587-5946 (T/L: 277-5946)
fax: 1-206-587-4415



"hosokawa" <hosokawa@xxxxxxxxxxxxxxxxx>
Sent by: dtp-dev-bounces@xxxxxxxxxxx

01/16/2007 07:15 PM

Please respond to
DTP development mailing list <dtp-dev@xxxxxxxxxxx>

To
"DTP development mailing list" <dtp-dev@xxxxxxxxxxx>
cc
Subject
[dtp-dev] SQL statements don't work well.





Hi,

On the SQL Editor, when I execute SQL statments like below, syntax error
occurs.

Executes SQL statements like:

   CREATE TABLE test_table (
           aaa INTEGER NOT NULL,
           bbb CHAR NOT NULL
       )
   ALTER TABLE test_table ADD CONSTRAINT unq_bbb UNIQUE (bbb)

Error occurs like:

  "Syntax error: Encountered "ALTER" at line 5, column 1."

Such a sequence, like CREATE TABLE and ALTER TABLE immediately, is not
admitted?
I checked they work well when CREATE TABLE statement and ALTER TABLE
statement
are executed separately like below exsample.

Executes just CREATE TABLE first:

   CREATE TABLE test_table (
           aaa INTEGER NOT NULL,
           bbb CHAR NOT NULL
       )

Executes ALTER TABLE next:

   ALTER TABLE test_table ADD CONSTRAINT unq_bbb UNIQUE (bbb)

I gotta "Succeeded" message at each time.

Best regards,

Takehiro Hosokawa
VALWAY Technology Center, NEC Soft, Ltd.

_______________________________________________
dtp-dev mailing list
dtp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dtp-dev


Back to the top