Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 3 of 3 total |
Inserting GUID in Stored Proc |
Wed, Apr 18 2007 3:53 PM | Permanent Link |
"Lance R" | I'm getting an error on the second data insert.
"Exception #700. Error found in the statement at line 2 and column 4 (expected column name but instead found "{2AD33F4D-D9B0-40FD-AFAF-7A3EE8C1B1EF}")'. I've tried all the combinations I could think of and can't insert the GUID. Lance ========================== /************************************************************ * * ElevateDB Reverse-Engineered procedure for the CDEMBD database * * Generated on 4/17/2007 10:38:26 AM * By the user Administrator * ************************************************************/ CREATE PROCEDURE Create_CDEMBD() BEGIN /************************************************************ * Tables ************************************************************/ EXECUTE IMMEDIATE 'CREATE TABLE "tMBDVERSION" ( "VersionID" INTEGER NOT NULL, "Version" INTEGER DEFAULT 1, CONSTRAINT "PrimaryKey" PRIMARY KEY ("VersionID") ) VERSION 7 UNENCRYPTED INDEX PAGE SIZE 4096 BLOB BLOCK SIZE 512 MAX ROW BUFFER SIZE 32768 MAX INDEX BUFFER SIZE 65536 MAX BLOB BUFFER SIZE 32768'; EXECUTE IMMEDIATE 'CREATE TABLE "taddresstype" ( "AddressTypeID" GUID DEFAULT CURRENT_GUID NOT NULL, "Description" VARCHAR(40) COLLATE "ANSI", "Created" TIMESTAMP DEFAULT CURRENT_TIMESTAMP, "LastModified" TIMESTAMP DEFAULT CURRENT_TIMESTAMP, "isActive" BOOLEAN DEFAULT TRUE, "ItemOrder" SMALLINT DEFAULT 1, CONSTRAINT "PrimaryKey" PRIMARY KEY ("AddressTypeID") ) VERSION 7 UNENCRYPTED INDEX PAGE SIZE 4096 BLOB BLOCK SIZE 512 MAX ROW BUFFER SIZE 32768 MAX INDEX BUFFER SIZE 65536 MAX BLOB BUFFER SIZE 32768'; EXECUTE IMMEDIATE 'INSERT INTO "tMBDVERSION" VALUES ( 1,1)'; EXECUTE IMMEDIATE 'INSERT INTO "taddresstype" VALUES ( "{2AD33F4D-D9B0-40FD-AFAF-7A3EE8C1B1EF}", "Billing", "2006-05-02 12:00", "2006-05-02 12:00", True, 3)'; /************************************************************ * Views ************************************************************/ /************************************************************ * Functions ************************************************************/ /************************************************************ * Procedures ************************************************************/ END /************************************************************ * End of generated SQL ************************************************************/ |
Wed, Apr 18 2007 5:28 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Lance,
<< I'm getting an error on the second data insert. "Exception #700. Error found in the statement at line 2 and column 4 (expected column name but instead found "{2AD33F4D-D9B0-40FD-AFAF-7A3EE8C1B1EF}")'. I've tried all the combinations I could think of and can't insert the GUID. >> You need doubled-up single quotes: EXECUTE IMMEDIATE 'INSERT INTO "taddresstype" VALUES ( ''{2AD33F4D-D9B0-40FD-AFAF-7A3EE8C1B1EF}'', ''Billing'', TIMESTAMP ''2006-05-02 12:00'', TIMESTAMP ''2006-05-02 12:00'', True,3)'; Those are doubled-up single quotes, even though they look like double quotes in Times New Roman. -- Tim Young Elevate Software www.elevatesoft.com |
Wed, Apr 18 2007 5:33 PM | Permanent Link |
"Lance R" | doooooh.
I better check my l1 and 0O 's too.... lol Thanks Tim! Lance "Tim Young [Elevate Software]" <timyoung@elevatesoft.com> wrote in message news:1D983804-E56D-4444-BDA9-FB5B7294D582@news.elevatesoft.com... > Lance, > > << I'm getting an error on the second data insert. > > "Exception #700. Error found in the statement at line 2 and column 4 > (expected column name but instead found > "{2AD33F4D-D9B0-40FD-AFAF-7A3EE8C1B1EF}")'. > > I've tried all the combinations I could think of and can't insert the > GUID. > >> > > You need doubled-up single quotes: > > EXECUTE IMMEDIATE 'INSERT INTO "taddresstype" VALUES ( > ''{2AD33F4D-D9B0-40FD-AFAF-7A3EE8C1B1EF}'', > ''Billing'', TIMESTAMP ''2006-05-02 12:00'', TIMESTAMP ''2006-05-02 > 12:00'', > True,3)'; > > Those are doubled-up single quotes, even though they look like double > quotes in Times New Roman. > > -- > Tim Young > Elevate Software > www.elevatesoft.com > |
This web page was last updated on Saturday, April 27, 2024 at 08:52 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |