Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Unique Records
Message
De
01/11/2000 12:44:24
 
 
À
01/11/2000 12:39:01
Todd Wolfe
Certified Marketing Services
Kinderhook, New York, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00436754
Message ID:
00436757
Vues:
23
>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform