Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Flipping the fields from horizontal to vertical
Message
 
 
À
19/09/2007 12:19:16
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01255514
Message ID:
01255517
Vues:
14
This message has been marked as the solution to the initial question of the thread.
SELECT ;
	KeyField, ;
	MyField01 AS MyField, ;
	FROM MyTable ;
	WHERE MyTable.KeyField == m.KeyExpression ;
UNION ALL ;	
SELECT ;
	KeyField, ;
	MyField02 AS MyField, ;
	FROM MyTable ;
	WHERE MyTable.KeyField == m.KeyExpression ;
	INTO CURSOR MyCursor
>Trying to flip some data around...
>
>
>SELECT ;
>	KeyField, ;
>	MyField01, ;
>	MyField02 ;
>	FROM MyTable ;
>	WHERE MyTable.KeyField == m.KeyExpression ;
>	INTO CURSOR MyCursor
>
>
>The output is like this:
>
>
>KeyField     MyField01     MyField02
>
>000001       Smith         Jones
>
>
>The results I want to get is:
>
>
>KeyField     MyField
>
>000001       Smith
>000001       Jones
>
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform