Select ORG_ID, ORG_NAME, SERVICE_DESCR
From ServiceOrderTbl
Where (Status = 'O'
AND ORG_ID in (Select org_id from SecurityRestrictionsTbl where oprid = 'User1'
AND
Select count(*) from SecurityRestrictionsTbl where oprid='User1' >0 )
OR
(Status = 'O' AND (NOT Select count(*) from SecurityRestrictionsTbl where oprid='User1' >0 )) ;
Main Topics
Browse All Topics





by: angelIIIPosted on 2009-04-17 at 10:17:37ID: 24169949
this will do:
Select allOpen in new window