Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Conditional select statement
Message
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01099679
Message ID:
01099866
Views:
17
I didn't look closely but why can't you always include that join in the query?

>>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.
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform