sql query with alias name
- by Ranjana
i have a table with this columns--- Or
orgid ispaid validity      noofthingstoTake
1      yes    2010-06-05      20
2      yes    2010-06-09       7
i have used this query(to join two more tableS):
select distinct B.RequirementID,A.OrganizationID 
from 
Organization A,RequirementsDetailsforOrganization B,validityorgdet F
where A.OrganizationID=B.OrganizationID and F.orgid=A.OrganizationID and
 F.ispaid=1 and F.validity>=GETDATE() and 
  F.noofthingstoTake> ?? 
but i dont know how to check the (noofthingstaken) over here. it should not exceed 20. im passing this query from my code behind page to the Sql. how to get the query excute to check it should not exceed the noofthingstaken
pls help me out....????