Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Conditional select statement
Message
 
 
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 SP2
Database:
Visual FoxPro
Divers
Thread ID:
01099679
Message ID:
01099847
Vues:
15
>What's JOIN condition for the Groups table ?

inner join UsGrLink on
Trans_Employees_Queues.cCommission_Owner_UsGrLink_fk = UsGrLink.cUsGrLink_pk inner join groups on UsGrLink.iGroupId = Groups.iID

>>
>>I have a queue assignment form that allows to get accounts from UNASSIGNED queue or from a particular investigator.
>>
>>In the first case one of the condition will look like:
>>
>>and Trans_Employees_Queues.cCommission_Owner_UsGrLink_fk IS NULL, in the other case the condition would be
>>Trans.cCommissioned_Owner = m.tcUserID
>>
>>Now, in the second case I'd like to join to another table (Groups) and get some fields from it. How can I make this generic, e.g. my routine doesn't know which type of WHERE condition I'm passing (I'm just passing lcWhereStr) for my select statement? In other words, I want to join with Groups table if cCommission_Owner_UsGrLink_fk is not null, otherwise I want to just put null placeholders instead of the fields.
>>
>>Thanks in advance.
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