Subject | Dynamic SQL Error SQL error code = -104. Unexpected end of command - line 7, column 47 |
---|---|
Author | Arnold Levy |
Post date | 2014-06-10T09:09:42Z |
Hi!
I've just started 'hacking' at using FireBird 2.5.
I've been able to create the .fb database.
I've written my DDL script to populate the created database - and I
keep getting the a/m annoying message - apparently in the CREATE TABLE
script. Line 7 is the definition for my column "_Emails" - character
47 is in the middle of 'SIZE 255' and 'CHARACTER SET ASCII' tokens.
This location for such an error is crazy!
Everything seems to be properly formed - can anyone cast some light on
what I am missing here?
My script is:
CREATE TABLE "Administrators" (
"_Id" INTEGER NOT NULL,
"_MyDetailId" INTEGER DEFAULT 0,
"_Name" VARCHAR(50),
"_Designation" VARCHAR(50),
"_Address" BLOB SUB_TYPE TEXT SEGMENT SIZE 255 CHARACTER SET ASCII,
"_Emails" BLOB SUB_TYPE TEXT SEGMENT SIZE 255 CHARACTER SET ASCII,
"_TelephoneNumbers" BLOB SUB_TYPE TEXT SEGMENT SIZE 255 CHARACTER SET ASCII,
"_Reference" VARCHAR(50)
);
ALTER TABLE "Administrators" ADD CONSTRAINT "PrimaryKey" PRIMARY KEY ("_Id");
CREATE INDEX "_Id" ON "Administrators"("_Id");
CREATE INDEX "_MyDetailId" ON "Administrators"("_MyDetailId");
CREATE GENERATOR "GEN_Administrators__Id";
CREATE TRIGGER "TR_AI_Administrators__Id" FOR "Administrators"
ACTIVE BEFORE INSERT
POSITION 0
AS
BEGIN
IF (NEW."_Id" IS NULL) THEN
NEW."_Id" = GEN_ID("GEN_Administrators__Id", 1);
END;
------------------------cut------------------------
I look forward to any guidance...
Sincerely,
Arnold.
I've just started 'hacking' at using FireBird 2.5.
I've been able to create the .fb database.
I've written my DDL script to populate the created database - and I
keep getting the a/m annoying message - apparently in the CREATE TABLE
script. Line 7 is the definition for my column "_Emails" - character
47 is in the middle of 'SIZE 255' and 'CHARACTER SET ASCII' tokens.
This location for such an error is crazy!
Everything seems to be properly formed - can anyone cast some light on
what I am missing here?
My script is:
CREATE TABLE "Administrators" (
"_Id" INTEGER NOT NULL,
"_MyDetailId" INTEGER DEFAULT 0,
"_Name" VARCHAR(50),
"_Designation" VARCHAR(50),
"_Address" BLOB SUB_TYPE TEXT SEGMENT SIZE 255 CHARACTER SET ASCII,
"_Emails" BLOB SUB_TYPE TEXT SEGMENT SIZE 255 CHARACTER SET ASCII,
"_TelephoneNumbers" BLOB SUB_TYPE TEXT SEGMENT SIZE 255 CHARACTER SET ASCII,
"_Reference" VARCHAR(50)
);
ALTER TABLE "Administrators" ADD CONSTRAINT "PrimaryKey" PRIMARY KEY ("_Id");
CREATE INDEX "_Id" ON "Administrators"("_Id");
CREATE INDEX "_MyDetailId" ON "Administrators"("_MyDetailId");
CREATE GENERATOR "GEN_Administrators__Id";
CREATE TRIGGER "TR_AI_Administrators__Id" FOR "Administrators"
ACTIVE BEFORE INSERT
POSITION 0
AS
BEGIN
IF (NEW."_Id" IS NULL) THEN
NEW."_Id" = GEN_ID("GEN_Administrators__Id", 1);
END;
------------------------cut------------------------
I look forward to any guidance...
Sincerely,
Arnold.