Query with In caluse

Posts   
 
    
monu
User
Posts: 3
Joined: 22-Oct-2007
# Posted on: 03-Jan-2008 19:27:11   

Hi

Can you please tell me how do I write in my code this query

select employee_dataid from employee_data where employee_dataid in (select emp_id from emp_tag_table)

there is a foriegn key relation between employee_data and emp_tag_table (both the tables)

and

select employee_dataid from employee_data where employee_dataid not in (select emp_id from emp_tag_table)

please help me

Thanks

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 04-Jan-2008 10:21:50   

1- if you want to fetch one field or a subset of an entity fields, then use a dynamicList Ref: LLBGen Pro manual -> Using the generated code -> Adapter/SelfServicing -> Using TypedViews, TypedLists & Dynamic Lists -> Using dynamic lists

2- For the IN or NOT IN predicates use FieldCompareSetPredicate Ref: LLBGen Pro manual -> Using the generated code -> Adapter/SelfServicing -> Filtering and sorting -> The predicate system