Greeting everyone
by using while select i'm really confused to how create a query by x++ for my request?
i have this table
i have tow request from this table i don't know get it by x++ select
1-i need employees which have only (Plan==PlanA && Status==Open) must this employees doesn't have another different row
and the result should be
(Katey , Ben)
others will be ignored because they have more than this satiation Plan and Status
2-i need employees which have only (Plan==PlanB && Status== Close )must this employees doesn't have another different row
and the result should be
(Sara)
others will be ignored because they have more than this satiation Plan and Status
i really try many select but all gone wrong how can i do that also i did used group by but still not give me the result which i need?
Record record;
Record notExistsRecord;
-- first case
select record
where record.Plan=='PlanA'
&& record.Status=='Open'
notexists join notExistsRecord
where record.Plan == notExistsRecord.Plan
&& record.RecId != notExistsRecord.RecId;
--second
select record
where record.Plan=='PlanB'
&& record.Status=='Closed'
notexists join notExistsRecord
where record.Plan == notExistsRecord.Plan
&& record.RecId != notExistsRecord.RecId;
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156