Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Unique Records
Message
From
01/11/2000 12:44:24
 
 
To
01/11/2000 12:39:01
Todd Wolfe
Certified Marketing Services
Kinderhook, New York, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00436754
Message ID:
00436757
Views:
21
>I have table with 8 numberic fields that contain numbers 0-2 . I am trying to find out how many uniq rows (combinations) that I have. I use this index statement but it don't work.
>
>inde on field1 + field2 + field3 + field4 +field5 + field6 + field7 + field8 to uniq c:\temp\inde
>
>Anyone else have any ideas?

Since they're numeric, you are summing up the field values instead of concatenating them.
You probably don't really need an index on this field combination, so why not use a select instead?
SELECT field1, field2, field3, field4, field5, field6, field7, field8, COUNT(*) AS unique_cnt;
  FROM mytable ;
  GROUP BY field1, field2, field3, field4, field5, field6, field7, field8 ;
  INTO CURSOR cutmp
If you do need the index
INDEX ON TRANSFORM(field1) + TRANSFORM(field2).... UNIQUE TAG mycnt
Insanity: Doing the same thing over and over and expecting different results.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform