Board index » delphi » 'Could not find PRIMARY KEY...

'Could not find PRIMARY KEY...

Ok, I have this in a file:

CREATE TABLE ...
  (...
   THEDATE     DATE NOT NULL,
   PANEL       CHAR(1) NOT NULL REFERENCES ...,
   ...
   PRIMARY KEY (THEDATE, PANEL));

and the result is:

Statement failed, SQLCODE = -607
unsuccessful metadata update

-could not find PRIMARY KEY index in specified table

And I *THINK* it might be because one of the two is a reserved word.
Any speculation? Is this a bug, or what?

The error messages on this thing could be a **BIT** more descriptive, yes?
Oh, and the online SQL reference could us:
1) a bigger typeface
2) a complete keyword/reserved-word list

Aloha from Vancouver, BC!

--
E ola mau ka `olelo Hawai`i!

Vote YES for Soc.Culture.Hawaii (Moderated)!
Strike a blow AGAINST Net-Terrorism!

Michael J. Wise
Vancouver, BC Canada
PGP Fingerprint = [80 FA 44 6B - C8 86 C1 2B - 70 0D 71 DE - A9 0C 62 85]

 

Re:'Could not find PRIMARY KEY...


Michael J. Wise (mjw...@unixg.ubc.ca) wrote:
: Ok, I have this in a file:

: CREATE TABLE ...
:   (...
:    THEDATE     DATE NOT NULL,
:    PANEL       CHAR(1) NOT NULL REFERENCES ...,
:    ...
:    PRIMARY KEY (THEDATE, PANEL));

: and the result is:

: Statement failed, SQLCODE = -607
: unsuccessful metadata update

: -could not find PRIMARY KEY index in specified table

: And I *THINK* it might be because one of the two is a reserved word.
: Any speculation? Is this a bug, or what?

: The error messages on this thing could be a **BIT** more descriptive, yes?
: Oh, and the online SQL reference could us:
: 1) a bigger typeface
: 2) a complete keyword/reserved-word list

Not enough information provided. I successfully used...

  CREATE TABLE MJWISE
  (
    THEDATE DATE NOT NULL,
    PANEL CHAR(1) NOT NULL REFERENCES AAA (KEYFIELD)
    PRIMARY KEY (THEDATE, PANEL)
  )

...where AAA is a table with a primary key based on the column KEYFIELD.
Some more information about the table and column on which the dependency
is based? Its metadata?

--
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
_/ Steve Koterski               _/   The opinions expressed here are    _/
_/ koter...@borland.com         _/         exclusively my own           _/
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

Other Threads