Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread SQL Help
Wed, Mar 19 2008 7:22 PMPermanent Link

"Lance Ras"
Ok...  There must be a snake here, but I can not find it.

Find below a test script.  The first table doesn't work and the second table
does.   The descriptions indicate the working/non working one.

I'm just not seeing why 1.08 is complaining.    "ElevateDB Error #700 - An
error was found in the statement at line 15 and column 19 (expected
expression but found instead founc ))

I see the difference being the left parinth being on the next line.   I even
tried moving it and it didn't help.

Assistance welcomed as always.

Lance


================
/* ---------------------------------------------------------------------- */
/* Script generated with:  v                                              */
/* Target DBMS:           ElevateDB 1.0                                   */
/* Project file:                                                          */
/* Project name:                                                          */
/* Author:                                                                */
/* Script type:           Database creation script                        */
/* Created on:            2008-03-19 15:44                                */
/* ---------------------------------------------------------------------- */


SCRIPT
BEGIN

EXECUTE IMMEDIATE 'CREATE TABLE "tournamentpeople2" (
   "IndexID" GUID DEFAULT CURRENT_GUID NOT NULL,
   "TournamentID" GUID NOT NULL,
   "PersonID" GUID NOT NULL,
   "ExternalID" GUID,
   "LocalID" INTEGER DEFAULT 0,
   "EnteringAve" SMALLINT DEFAULT 0,
   "RerateAve" SMALLINT DEFAULT 0,
   "Games" SMALLINT DEFAULT 0,
   "Pins" INTEGER DEFAULT 0,
   "Cashed" BOOLEAN DEFAULT FALSE,
   "CashedTotal" FLOAT(),
   "Disqualified" BOOLEAN DEFAULT FALSE,
   "Comments" VARCHAR(200),
   "Created" TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,
   "LastModified" TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
   "isActive" BOOLEAN DEFAULT TRUE,
   "isCurrent" BOOLEAN DEFAULT TRUE,
   "Revision" SMALLINT DEFAULT 0,
   CONSTRAINT "PrimaryKey" PRIMARY KEY ("TournamentID", "PersonID",
"ExternalID"),
   CONSTRAINT "IDXTrnExtID" UNIQUE ("TournamentID", "ExternalID")
)
DESCRIPTION ''Does not work''
VERSION 1.02
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 "tournamentpeople1"
                    (
                    "IndexID" GUID DEFAULT CURRENT_GUID   NOT NULL,
                    "TournamentID" GUID NOT NULL,
                    "PersonID" GUID NOT NULL,
                    "ExternalID" GUID,
                    "LocalID" INTEGER DEFAULT 0,
                    "EnteringAve" SMALLINT DEFAULT 0,
                    "RerateAve" SMALLINT DEFAULT 0,
                    "Games" SMALLINT DEFAULT 0,
                    "Pins" INTEGER DEFAULT 0,
                    "Cashed" BOOLEAN DEFAULT FALSE,
                    "CashedTotal" FLOAT,
                    "Disqualified" BOOLEAN DEFAULT FALSE,
                    "Comments" VARCHAR(200),
                    "Created" TIMESTAMP DEFAULT CURRENT_TIMESTAMP   NOT
NULL,
                    "LastModified" TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
                    "isActive" BOOLEAN DEFAULT TRUE,
                    "isCurrent" BOOLEAN DEFAULT TRUE,
                    "Revision" SMALLINT DEFAULT 0,
                    CONSTRAINT "PrimaryKey" PRIMARY KEY ("TournamentID",
"PersonID", "ExternalID"),
                    CONSTRAINT "IDXTrnExtID" UNIQUE ("TournamentID",
"ExternalID")
                    )
                    DESCRIPTION ''Works''
                    VERSION 1.01
                    UNENCRYPTED
                    INDEX PAGE SIZE 4096
                    BLOB BLOCK SIZE 512
                    MAX ROW BUFFER SIZE 32768
                    MAX INDEX BUFFER SIZE 65536
                    MAX BLOB BUFFER SIZE 32768';




END
/************************************************************
* End of generated SQL
************************************************************/


=================
Thu, Mar 20 2008 4:05 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Lance


The only thing I can spot is FLOAT() should be FLOAT


Roy Lambert
Thu, Mar 20 2008 4:46 AMPermanent Link

Uli Becker
Lance,

Roy is right: FLOAT() should be FLOAT: that causes the error.

Uli
Thu, Mar 20 2008 1:27 PMPermanent Link

"Lance Ras"
Thanks for the eyes Roy and Uli,

I completely missed the snake.   Then again...   I was focusing on where the
error was indicating the problem, not with where it really was...

Tim - Request for EDB 2.x    Psychic debugging module please.

Lance


"Lance Ras" <lance@cdesoftware.com> wrote in message
news:CB3D6CAF-A680-43F9-8D51-58AF2406576E@news.elevatesoft.com...
> Ok...  There must be a snake here, but I can not find it.
>
> Find below a test script.  The first table doesn't work and the second
> table does.   The descriptions indicate the working/non working one.
>
> I'm just not seeing why 1.08 is complaining.    "ElevateDB Error #700 - An
> error was found in the statement at line 15 and column 19 (expected
> expression but found instead founc ))
>
> I see the difference being the left parinth being on the next line.   I
> even tried moving it and it didn't help.
>
> Assistance welcomed as always.
>
> Lance
>
>
> ================
> /* ----------------------------------------------------------------------  
> */
> /* Script generated with:  v
> */
> /* Target DBMS:           ElevateDB 1.0
> */
> /* Project file:
> */
> /* Project name:
> */
> /* Author:
> */
> /* Script type:           Database creation script
> */
> /* Created on:            2008-03-19 15:44
> */
> /* ----------------------------------------------------------------------  
> */
>
>
> SCRIPT
> BEGIN
>
> EXECUTE IMMEDIATE 'CREATE TABLE "tournamentpeople2" (
>    "IndexID" GUID DEFAULT CURRENT_GUID NOT NULL,
>    "TournamentID" GUID NOT NULL,
>    "PersonID" GUID NOT NULL,
>    "ExternalID" GUID,
>    "LocalID" INTEGER DEFAULT 0,
>    "EnteringAve" SMALLINT DEFAULT 0,
>    "RerateAve" SMALLINT DEFAULT 0,
>    "Games" SMALLINT DEFAULT 0,
>    "Pins" INTEGER DEFAULT 0,
>    "Cashed" BOOLEAN DEFAULT FALSE,
>    "CashedTotal" FLOAT(),
>    "Disqualified" BOOLEAN DEFAULT FALSE,
>    "Comments" VARCHAR(200),
>    "Created" TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,
>    "LastModified" TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
>    "isActive" BOOLEAN DEFAULT TRUE,
>    "isCurrent" BOOLEAN DEFAULT TRUE,
>    "Revision" SMALLINT DEFAULT 0,
>    CONSTRAINT "PrimaryKey" PRIMARY KEY ("TournamentID", "PersonID",
> "ExternalID"),
>    CONSTRAINT "IDXTrnExtID" UNIQUE ("TournamentID", "ExternalID")
> )
> DESCRIPTION ''Does not work''
> VERSION 1.02
> 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 "tournamentpeople1"
>                     (
>                     "IndexID" GUID DEFAULT CURRENT_GUID   NOT NULL,
>                     "TournamentID" GUID NOT NULL,
>                     "PersonID" GUID NOT NULL,
>                     "ExternalID" GUID,
>                     "LocalID" INTEGER DEFAULT 0,
>                     "EnteringAve" SMALLINT DEFAULT 0,
>                     "RerateAve" SMALLINT DEFAULT 0,
>                     "Games" SMALLINT DEFAULT 0,
>                     "Pins" INTEGER DEFAULT 0,
>                     "Cashed" BOOLEAN DEFAULT FALSE,
>                     "CashedTotal" FLOAT,
>                     "Disqualified" BOOLEAN DEFAULT FALSE,
>                     "Comments" VARCHAR(200),
>                     "Created" TIMESTAMP DEFAULT CURRENT_TIMESTAMP   NOT
> NULL,
>                     "LastModified" TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
>                     "isActive" BOOLEAN DEFAULT TRUE,
>                     "isCurrent" BOOLEAN DEFAULT TRUE,
>                     "Revision" SMALLINT DEFAULT 0,
>                     CONSTRAINT "PrimaryKey" PRIMARY KEY ("TournamentID",
> "PersonID", "ExternalID"),
>                     CONSTRAINT "IDXTrnExtID" UNIQUE ("TournamentID",
> "ExternalID")
>                     )
>                     DESCRIPTION ''Works''
>                     VERSION 1.01
>                     UNENCRYPTED
>                     INDEX PAGE SIZE 4096
>                     BLOB BLOCK SIZE 512
>                     MAX ROW BUFFER SIZE 32768
>                     MAX INDEX BUFFER SIZE 65536
>                     MAX BLOB BUFFER SIZE 32768';
>
>
>
>
> END
> /************************************************************
> * End of generated SQL
> ************************************************************/
>
>
> =================
Image