Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM SQL » View Thread |
Messages 1 to 3 of 3 total |
sqlscript syntax |
Thu, Jul 13 2006 8:35 AM | Permanent Link |
Jerry Blumenthal | The v2.12 manual says each sqlscript statement must terminate with a
semicolon. I am using ALTER TABLE to add or redefine a field, and then want to change the major version. Do I need to use ALTER TABLE in both statements as below? ADD('ALTER TABLE "mytbl.dat" ADD myField CHAR(10);') ADD('ALTER TABLE "mytbl.dat" USER MAJOR VERSION 2 USER MINOR VERSION 4'); or is it ok to write ADD('ALTER TABLE "mytbl.dat" ADD myField CHAR(10);') ADD('USER MAJOR VERSION 2 USER MINOR VERSION 4'); Jerry |
Thu, Jul 13 2006 10:43 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Jerry
I think you'll find the definition of an sqlscript statement to mean the whole statement not each line eg when adding multiple fields the statement would be ALTER TABLE Fred ADD COLUMN C1 INTEGER AT 3, ADD COLUMN C7 BOOLEAN, ADD COLUMN LoadsOfText MEMO; But note the comma separating each bit of the statement. These are needed to separate commands within a statement, but not directives (I think - I generally suck'n'see) so if you didn't want a backup creating the statement would be ALTER TABLE Fred ADD COLUMN C1 INTEGER AT 3, ADD COLUMN C7 BOOLEAN, ADD COLUMN LoadsOfText MEMO NOBACKUP; ie without a comma after MEMO At least that's the case in V4 - I wasn't using SQL back in 2.12 - strictly tables Roy Lambert |
Thu, Jul 13 2006 2:11 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Jerry,
<< or is it ok to write ADD('ALTER TABLE "mytbl.dat" ADD myField CHAR(10);') ADD('USER MAJOR VERSION 2 USER MINOR VERSION 4'); >> It would be this (as Roy stated): ADD('ALTER TABLE "mytbl.dat" ADD myField CHAR(10)'); <<< No semicolon here ADD('USER MAJOR VERSION 2 USER MINOR VERSION 4'); -- 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 |