Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL: ORDER BY clause is invalid
Message
De
01/04/2005 09:41:23
 
 
À
01/04/2005 09:30:48
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Novell 5.x
Database:
Visual FoxPro
Divers
Thread ID:
01000629
Message ID:
01000634
Vues:
33
>This used to work fine in vfp3
>
>select distinct last_name, first_name, mid_name, ;
>  address1, address2, city, state, zip_code, ;
>  ' ' as packet_id,ssn, right(a.ssn,4) as ssno ;
>  from temp ;
>  into cursor address ;
>  order by ssno, ssn
>
>How to fix in vfp9 besides making two statements?
>How to find all like this in code?

Doug,
this is a vfp9 bug, but VFPT "guru" say it is ok, then you have to use a workaround.

workaround 1 ( fast )
select distinct right(a.ssn,4) as ssno ,ssn,last_name, first_name, mid_name, ;
  address1, address2, city, state, zip_code, ;
  ' ' as packet_id;
  from temp ;
  into cursor address
workaround 2 ( slow )
SELECT * FROM ;
(select distinct last_name, first_name, mid_name, ;
  address1, address2, city, state, zip_code, ;
  ' ' as packet_id,ssn, right(a.ssn,4) as ssno ;
  from temp ) t_distinct;
  order by ssno, ssn;
  into cursor address
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform