Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB SQL » View Thread |
Messages 1 to 4 of 4 total |
ElevateDB Manager |
Fri, Jul 17 2009 4:35 AM | Permanent Link |
Phil Read | Hi All,
This might sound silly, but I've opened up a new statement in the ElevateDB Manager that contains SQL code like this... INSERT INTO "states" VALUES ('ALABAMA','AL'); INSERT INTO "states" VALUES ('ALASKA','AK'); INSERT INTO "states" VALUES ('AMERICAN SAMOA','AS'); INSERT INTO "states" VALUES ('ARIZONA','AZ'); INSERT INTO "states" VALUES ('ARKANSAS','AR'); INSERT INTO "states" VALUES ('CALIFORNIA','CA'); INSERT INTO "states" VALUES ('COLORADO','CO'); INSERT INTO "states" VALUES ('CONNECTICUT','CT'); INSERT INTO "states" VALUES ('DELAWARE','DE'); But when I run it I get the message: ElevateDB Error #700 An error was found in the statement at line 2 and column 1 (Expected end of expression but instead found INSERT) Why will it NOT let me run more than one INSERT statement? Cheers, Phil. |
Fri, Jul 17 2009 5:40 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Phil
You're trying to do things the DBISAM way and EleveateDB doesn't. Queries are now simple single sql statements there's a new construct called a SCRIPT which runs multiple statements and a lot more beside (a programming language all of its own). Naturally the syntax is a bit different as well. For your lines the simplest way would be a series of lines like EXECUTE IMMEDIATE 'INSERT INTO "states" VALUES (''ALABAMA'',''AL'')'; (note the quote quote around the data) In EDBManager rather than just clicking New click on its drop down and select script and put your lines in between the begin and end. Roy Lambert [Team Elevate] |
Fri, Jul 17 2009 6:03 AM | Permanent Link |
Phil Read | Thanks Muchly Roy!
As always you or Tim come up with the prompt answers I need! God I wish with CodeGear Newsgroup was that fast. Have a great weekend, Phil. Roy Lambert wrote: > Phil > > > You're trying to do things the DBISAM way and EleveateDB doesn't. Queries are now simple single sql statements there's a new construct called a SCRIPT which runs multiple statements and a lot more beside (a programming language all of its own). > > Naturally the syntax is a bit different as well. For your lines the simplest way would be a series of lines like > > EXECUTE IMMEDIATE 'INSERT INTO "states" VALUES (''ALABAMA'',''AL'')'; > > (note the quote quote around the data) > > In EDBManager rather than just clicking New click on its drop down and select script and put your lines in between the begin and end. > > Roy Lambert [Team Elevate] > |
Fri, Jul 17 2009 2:24 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Phil,
<< This might sound silly, but I've opened up a new statement in the ElevateDB Manager that contains SQL code like this... >> 1) Create a new SQL script by selecting File/New/Script from the main menu. 2) Take your statements and put them into the new SQL script window, overwriting the SCRIPT..BEGIN..END block that exists already. 3) Select the Script/Convert into Script option from the main menu. That will give you a complete script in the proper syntax. -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Tuesday, April 30, 2024 at 03:55 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |