Hi Sisilla,

LONG VARCHAR is a type typically used for BLOBs: images, large documents, graphics, and the like. So it's inappropriate for a primary key or unique or indexed column.

Are you sure that EmployeeID is a large object? Or perhaps it should be an integer or other integral type.

Craig

On Nov 10, 2006, at 10:29 AM, Sisilla Sookdeo wrote:

Hello All,

 

I am trying to create a table with a field of type ‘LONG VARCHAR,’ but I keep getting the following error message:

 

An error has occurred during execution: Columns of type “LONG VARCHAR’ may not be used in CREATE INDEX, ORDER BY, GROUP BY, UNION, INTERSECT, EXCEPT or DISTINCT statements because comparisons are not supported for that type.

 

Am I missing something here? I am using Derby 10.2.1.6 on Windows XP Professional. I tried executing the following SQL code in NetBeans IDE:

 

CREATE TABLE Personnel

(

            PTTEmployeeID LONG VARCHAR NOT NULL,

            NationalID VARCHAR(55) NOT NULL,

            FirstName VARCHAR(55) NOT NULL,

            Surname VARCHAR(55) NOT NULL,

            PRIMARY KEY (PTTEmployeeID),

            UNIQUE (NationalID)

)

 

I appreciate any help.

 

Thanks,

Sisilla

 



Craig Russell

Architect, Sun Java Enterprise System http://java.sun.com/products/jdo

408 276-5638 mailto:[EMAIL PROTECTED]

P.S. A good JDO? O, Gasp!


Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to