Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
1 field become 2 fields in newtable
Message
 
À
29/09/2006 20:51:53
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01158176
Message ID:
01158356
Vues:
33
>Thank you Vladimir,
>
>It worked fine after testing your code, is it possible to do with
>SQL statment only ?

Yes, but only with VFP9
SELECT cOdd.Field          AS Amount1,;
       NVL(cEven.Field,"") AS Amount2 ;
  FROM (SELECT recno() AS pk, Field FROM mytable WHERE recno()%2=1) cOdd;
  LEFT JOIN (SELECT recno()-1 AS pk, Field FROM mytable WHERE recno()%2=0) cEven ON cEven.pk =cOdd.pk;
  INTO Table NewTable
_______________________________________________________________
Testing displays the presence, not the absence of bugs.
If a software application has to be designed, it has to be designed correctly!
_______________________________________________________________
Vladimir Zografski
Systems Analyst
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform