Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL SYNTAX
Message
De
11/04/2001 03:00:50
Gavin Reid
L & M Marketing Pty Ltd
Frenchs Forest, Australie
 
 
À
11/04/2001 02:44:45
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00494306
Message ID:
00494308
Vues:
19
Hi Mohammed,

The following will give you a Cursor of all names in a table where the last name occurs more than once:
SELECT UPPER(lastname) AS lastname ;
   FROM mytable ;
   GROUP BY 1 ;
   HAVING COUNT(*) > 1 ;
   INTO CURSOR firstpass_cursor

SELECT mytable.* ;
   FROM firstpass_cursor, mytable ;
   WHERE UPPER(mytable.lastname) = firstpass_cursor.lastname ;
   INTO CURSOR secondpass_cursor ;
   ORDER BY firstpass_cursor.lastname
Hope this helps,
Gavin...

>I want sql command of query
>
>
>I want name of all the persons whos last name is same in the table
>
>Plese help me
>
>
>Thanks
>Mohammed
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform