Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 I want query for.....

Author  Topic 

asifbhura
Posting Yak Master

165 Posts

Posted - 2010-04-14 : 07:49:29
Hi,

I have one table which field like

Id, empl_level, empid,deptId,IsApprove,IsAction etc...

now I have one user who is manager of 3 department such as 0201120,0112025,0123501

Now I want query like

all empl_level ='1' and Isapprove="False" and IsAction="No" and
all empid which is under that 3 department(0201120,0112025,0123501)

Regards,
ASIF

theboyholty
Posting Yak Master

226 Posts

Posted - 2010-04-14 : 08:13:22
You may have to explain yourself better because its not very clear, but I think what you're asking can be solved with an IN clause. e.g.

SELECT [fieldnames]
FROM [tablename]
WHERE empl_level ='1' and Isapprove="False" and IsAction="No" and
empid IN (0201120,0112025,0123501)



---------------------------------------------------------------------------------
http://www.mannyroadend.co.uk The official unofficial website of Bury Football Club
Go to Top of Page
   

- Advertisement -