Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB SQL » View Thread |
Messages 1 to 5 of 5 total |
Please enlight me! ;-) |
Sat, Jan 5 2013 8:52 PM | Permanent Link |
Mario Enríquez Open Consult | Hello everybody,
Could anybody please enlightme as to why this script wouldn't run on EDBMGR? SCRIPT BEGIN USE TestDB1; CREATE TABLE GRL_CTA_HABIENTE ( ID_CTA_HABIENTE GUID NOT NULL, NOMBRE_COMERCIAL VARCHAR(100) NOT NULL, RAZON_SOCIAL VARCHAR(100), NIT VARCHAR(20), WEBSITE VARCHAR(100), TELEFONO VARCHAR(20), CONSTRAINT "PK_GRL_CTA_HABIENTE" PRIMARY KEY ("ID_CTA_HABIENTE") ); USE; END Everytime I run it, I got the following error: "ElevateDB Error #700 An error was found in the statement at line 11 and column 4 (Expected end of expression but instead found USE)" I've read the manual and the sample posted in this forum and it appears to be complaint statement. What I may doing wrong? Regards, Mario |
Sat, Jan 5 2013 11:09 PM | Permanent Link |
IQA | Hi Mario,
Just a guess, not tried it, but should the CREATE TABLE section not use the EXECUTE IMMEDIATE '' ??? for example... SCRIPT BEGIN USE TestDB1; EXECUTE IMMEDIATE 'CREATE TABLE GRL_CTA_HABIENTE ( ID_CTA_HABIENTE GUID NOT NULL, NOMBRE_COMERCIAL VARCHAR(100) NOT NULL, RAZON_SOCIAL VARCHAR(100), NIT VARCHAR(20), WEBSITE VARCHAR(100), TELEFONO VARCHAR(20), CONSTRAINT "PK_GRL_CTA_HABIENTE" PRIMARY KEY ("ID_CTA_HABIENTE") )'; USE; END I hope that works for you. Cheers, Phil. On 6/01/2013 12:52 PM, Mario Enríquez wrote: > Hello everybody, > > Could anybody please enlightme as to why this script wouldn't run on EDBMGR? > > SCRIPT > BEGIN > USE TestDB1; > > CREATE TABLE GRL_CTA_HABIENTE ( > ID_CTA_HABIENTE GUID NOT NULL, > NOMBRE_COMERCIAL VARCHAR(100) NOT NULL, > RAZON_SOCIAL VARCHAR(100), > NIT VARCHAR(20), > WEBSITE VARCHAR(100), > TELEFONO VARCHAR(20), > CONSTRAINT "PK_GRL_CTA_HABIENTE" PRIMARY KEY ("ID_CTA_HABIENTE") > ); > > USE; > END > > Everytime I run it, I got the following error: > > "ElevateDB Error #700 An error was found in the statement at line 11 and column 4 (Expected end of expression but instead found USE)" > > I've read the manual and the sample posted in this forum and it appears to be complaint statement. What I may doing wrong? > > Regards, > Mario > |
Sun, Jan 6 2013 1:25 PM | Permanent Link |
Mario Enríquez Open Consult | Thank you Phil, enclosing the script with EXECUTE IMMEDIATE has done it.
BTW, Is this the only way to apply an script to create tables? I have a big script and I would like avoid inserting EXECUTE IMMEDIATE in every DDL statement to make it work. regards, Mario |
Sun, Jan 6 2013 4:26 PM | Permanent Link |
Adam Brett Orixa Systems | >>I have a big script and I would like avoid inserting EXECUTE IMMEDIATE in every DDL statement to make it work. Sorry Mario as far as I know each piece of DDL needs to be wrapped with: EXECUTE IMMEDIATE '<statement here> '; -- ... I usually use EDBMgr's "convert Into Script" menu item to automate this: 1. In a new SCRIPT in EDBMgr, add a ";" to the end of each CREATE segment. 2. Select "Script", "Convert into Script" from the menu. |
Sun, Jan 6 2013 4:35 PM | Permanent Link |
Mario Enríquez Open Consult | Bummer...
But thanks on the "Convert Into Script" tip, I'll look into it. Regards, Mario |
This web page was last updated on Friday, April 26, 2024 at 06:09 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |