Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 3 of 3 total |
How to make a create table script with many 'create tables'? |
Wed, Aug 7 2019 7:34 AM | Permanent Link |
Polywick Studio | My script is:
(note - this is an example) CREATE TABLE "customers" ( "id" VARCHAR(38) COLLATE "UNI" NOT NULL, "code" VARCHAR(20) COLLATE "UNI", } CREATE TABLE "vendor" ( "id" VARCHAR(38) COLLATE "UNI" NOT NULL, "code" VARCHAR(20) COLLATE "UNI", } I get error. ElevateDB Error #700 An error was found in the statement at line 5 and column 1 (Expected column name but instead found }) What's wrong? I want to create a SQL script that executes multiple create table statements. |
Wed, Aug 7 2019 8:25 AM | Permanent Link |
Raul Team Elevate | On 8/7/2019 7:34 AM, Polywick Studio wrote:
> My script is: > > (note - this is an example) > > CREATE TABLE "customers" > ( > "id" VARCHAR(38) COLLATE "UNI" NOT NULL, > "code" VARCHAR(20) COLLATE "UNI", > } > > CREATE TABLE "vendor" > ( > "id" VARCHAR(38) COLLATE "UNI" NOT NULL, > "code" VARCHAR(20) COLLATE "UNI", > } > > I get error. > ElevateDB Error #700 An error was found in the statement at line 5 and column 1 (Expected column name but instead found }) > > What's wrong? > I want to create a SQL script that executes multiple create table statements. > How are you running this exactly ? Assuming you simply want to run this in EDBManager you need to separate the statements. Default in EDBManager is ! so this should work. in this example you also have extra commas Something like this should work - it does for me CREATE TABLE "customers" ( "id" VARCHAR(38) COLLATE "UNI" NOT NULL, "code" VARCHAR(20) COLLATE "UNI" ) ! CREATE TABLE "vendor" ( "id" VARCHAR(38) COLLATE "UNI" NOT NULL, "code" VARCHAR(20) COLLATE "UNI" ) Another easy way for this is create the table (al alter or whatever) in EDBManager and then Explorer->SQL History shows you actual SQL that was generated Raul |
Wed, Aug 7 2019 12:11 PM | Permanent Link |
Terry Swiers | > CREATE TABLE "customers"
> ( > "id" VARCHAR(38) COLLATE "UNI" NOT NULL, > "code" VARCHAR(20) COLLATE "UNI", > } > <snip> > > I get error. > ElevateDB Error #700 An error was found in the statement at line 5 and column 1 (Expected column name but instead found }) > > What's wrong? The error message is spot on. EDB is expecting a ) at the end of the column definitions but it found a close brace " } " instead. |
This web page was last updated on Saturday, May 4, 2024 at 12:54 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |