Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL into one and 'A' before 0
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00794037
Message ID:
00794046
Vues:
24
This message has been marked as a message which has helped to the initial question of the thread.
You can simplify it a little bit.
SELECT ..., 
  IIF(LEFT(contact,1) >= "A", "1", "2") AS cord ;
  ORDER BY cord, contact 
  ...
>Clean up this code---
>
>  Select contact, eligarea, groupnum, groupname, ;
> IIF(ASC(contact)>64, ASC(contact)-48,ASC(contact)) as contactord from modicomm ;
>         WHERE NOT DELETED() ORDER BY contactord INTO CURSOR TempC
>  SELECT contact, eligarea, groupnum, groupname FROM TempC INTO CURSOR Temp
>  Select Temp
>  Copy to C:\Temp\vsamnew.txt Type SDF
>
>
>The reason for the IF in the SQL is to force 'contact' that begin with a letter to be before contacts that begin with a number.
>
>This mess works, but, I would like it cleaned!
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform