Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excluding Deleted Rows from Multi-Table Select
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00322146
Message ID:
00322169
Views:
26
Already tried that, thanks. I think we've sorted it by wrapping the select in a SET DELETED ON. Although that had to be done in the grid that receives this command (complicated framework issue).

>Hi Nigel,
>
>I think you may want to drop the HAVING clause and try this WHERE clause:
>
>
>WHERE NOT EMPTY(lk.lk_userid) ;
>  AND NOT EMPTY(lk.lk_sessionid) ;
>  AND NOT DELETED('testuserlog')
>
>
>Since TESTUSERLOG is your main table and you're not doing any outer joins, this should do the trick.
>
>HTH.
>
>>I am having trouble excluding deleted rows from one table in a four-table select statement. I've tried many different variations but can't seem to get it working. Any ideas?
>>
>>
>>SELECT lk.lk_userid, ul.activity, co.co_name, su.username, DELETED('testuserlog') AS uldeleted  ;
>>    FROM testuserlog ul ;
>>        JOIN seqlock lk ON ul.sessionid=lk.lk_sessionid ;
>>        JOIN sequser su ON lk.lk_userid=su.user ;
>>        JOIN seqco co ON ul.companyid=co.co_code ;
>>    WHERE NOT EMPTY(lk.lk_userid) ;
>>        AND NOT EMPTY(lk.lk_sessionid) ;
>>    HAVING uldeleted=.F.
>>
>>
>>Thanks,
Nigel B Coates
NBC Software Services
Dublin, Ireland.
eMail: Nigel.Coates@NBCSoftware.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform