Click here to Skip to main content
15,949,741 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
SQL
Select 
    CMD_CompanyID 
from 
    companydata 
where 
    CMD_CompanyDataFieldID=17 AND CMD_Value = 0 
    AND CMD_CompanyID IN(
                            Select CMD_CompanyID from companydata 
                            where CMD_CompanyDataFieldID=19 AND CMD_Value = 0
                        )
Posted
Updated 20-Mar-14 2:03am
v3
Comments
joshrduncan2012 20-Mar-14 10:52am    
What's your question?
sourabh_mittal 21-Mar-14 3:14am    
i am using this query in nhibetnate in vb.net, but this is the normal SQL query. but i want to use the nhibetnate query. so i want its conversion in nhibernate Query.
Maciej Los 21-Mar-14 3:25am    
It's NOT "Normal" query! It's wrong query! Where condition is completely bad!
sourabh_mittal 21-Mar-14 3:37am    
what is wrong with this query?
Maciej Los 21-Mar-14 3:40am    
Isn't simpler: where CMD_CompanyDataFieldID=17 AND CMD_Value = 0 AND CMD_CompanyDataFieldID=19

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900