Subject | Index on Sub String |
---|---|
Author | Robert F. Tulloch |
Post date | 2001-11-21T03:38:36Z |
Hi:
Have mailing database. Need to index (unique) in first three digits
of Zip code, read that into a stringlist then iterate through the list
calculating count for each unique set of 3 digits.
How to create index on a sub string of a field?
ZIP VARCHAR(15)
I tried:
CREATE UNIQUE ASC INDEX Zip3 ON NEWSLET SUBSTR(ZIP,1,3);
Doesn't like the ( after SUBSTR. I use SUBSTR(ZIP,1,5) in other things
and it works. What is problem with index?
Zip field example: 48105-4456
Thanks.
Best regards
Have mailing database. Need to index (unique) in first three digits
of Zip code, read that into a stringlist then iterate through the list
calculating count for each unique set of 3 digits.
How to create index on a sub string of a field?
ZIP VARCHAR(15)
I tried:
CREATE UNIQUE ASC INDEX Zip3 ON NEWSLET SUBSTR(ZIP,1,3);
Doesn't like the ( after SUBSTR. I use SUBSTR(ZIP,1,5) in other things
and it works. What is problem with index?
Zip field example: 48105-4456
Thanks.
Best regards