Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is there a way to simplify this selection
Message
 
 
À
15/12/2005 13:18:48
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP1
Divers
Thread ID:
01078376
Message ID:
01078395
Vues:
11
This message has been marked as the solution to the initial question of the thread.
Another one
SELECT DISTINCT mt.* FROM mytable mt ;
	JOIN TempAcctList ON acct IN (acct1, acct2, acct3)
>I have an old DBF that I'm accessing that has account numbers stored in 9 fields, "ACCT1", "ACCT2", etc.
>
>I need to select all records where any of these accounts appear in a list of accounts which is in a cursor ("TempAcctList") with one field.
>
>Is there any simpler way to select these records than the following:
>
SELECT * From OldTable ;
>where acct1 in (select * from TempAcctList) ;
>or acct2 in (select * from TempAcctList) ;
>or acct3 in (select * from TempAcctList) ;
>... etc, through all nine accounts
>I can certainly do this, but am just wondering if there's any simpler construction, or more efficient way to do this.
>
>Thanks in advance
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform