"Farzana" <[EMAIL PROTECTED]>
wrote in message news:[EMAIL PROTECTED]
> We are using SQLite and we have the table structure as CREATE TABLE
> Brand(PcNo numeric(4) Not Null,SubPcNo numeric(4) Not Null,BrandNo
> numeric(9) Not Null,BrandDescription nVARCHAR(254)Not Null,ST
> numeric(1),TS numeric(14)) where the index is CREATE UNIQUE index
> BrandKey1 on Brand(PcNo,SubPcNo,BrandNo). When we use this table in
> the application we are suppose to sort the datas by
> BrandDescription.So we tried to create a unique index as CREATE
> UNIQUE INDEX BrandKey2 on Brand(BrandDescription).But we couldn't
> able to create the unique index.

Define "couldn't able". What exactly seems to be the problem? Did you 
get an error message? What did the message say?

Is it possible that the values in BrandDescription column are not in 
fact unique? If they are not, then naturally you would get an error 
trying to create a unique index. Try this statement:

select * from Brand
group by BrandDescription
having count(*) > 1;

If this returns any rows, you have duplicates.

Igor Tandetnik 



_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to