Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL help
Message
 
 
À
01/05/2001 12:12:22
Chuck Tripi
University of Wisconsin - Milwaukee
Milwaukee, Wisconsin, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00502017
Message ID:
00502032
Vues:
19
This message has been marked as the solution to the initial question of the thread.
>The first CASE works perfectly:
>
>CASE m.pick='Org'
>	=SEEK(ThisForm.List1.List(ThisForm.List1.ListIndex),"org","main")
 >	SELECT person.name, auth.organization, auth.authtype, auth.effective, auth.end ;
>		FROM auth, person ;
>		WHERE auth.organization=org.organization ;
>		AND person.id=auth.id ;
>		INTO CURSOR temp
>browse
>
>Now, the trouble is this next CASE. Even though this CASE is based on m.pick='Name', it will still be same as for m.pick='Person ID' (I could put them together into one CASE, but that's not the issue). What I like to do is list ALL authorizations (auth.authtype) this person have (person.id). In other words, I need to know what this one person.id have in the auth table equaling matching person.id=auth.id.
>
>CASE m.pick='Name'
>*	=SEEK(ThisForm.List1.List(ThisForm.List1.ListIndex),"person","main")
       local lnPersonID
        lnPerson=int(val(ThisForm.List1.List(ThisForm.List1.ListIndex)))
        lnName=ThisForm.List1.List(ThisForm.List1.ListIndex,2)
>	SELECT lnName as PName, auth.organization, auth.authtype, auth.effective, auth.end ;
>		FROM auth ;
>		WHERE auth.id=lnPersonID ;
>		INTO CURSOR curTemp
>browse
>
>Thanks.
>
>Chuck
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform