PicklistNo Status
PKL019000 LOD
PKL019000 LOD
PKL019000 LOD
PKL019000 LOD
PKL019000 WIP
If any status contain Wip it give no result.
I used query :-
Select DISTINCT PickListNo,status from tablename WHERE PickListNo='PKL019000' and Status='LOD'
It gives me result. But I dont want any row if any row status contain WIP
If any status contain Wip it give no result.
I used query :-
Select DISTINCT PickListNo,status from tablename WHERE PickListNo='PKL019000' and Status='LOD'
It gives me result. But I dont want any row if any row status contain WIP

Jignesh TrivediPosted Oct 29, 2013, 2:52 AM
try following query
Select DISTINCT PickListNo,status from #tempTable1 p WHERE PickListNo='PKL019000'
and NOT EXISTS(select * from #tempTable1 where PickListNo = p.PickListNo and Status = 'WIP')
hope this will help you.
Jignesh TrivediPosted Oct 30, 2013, 12:53 AM
Ravi ShekharPosted Oct 29, 2013, 11:45 PM
srinivas thummalapalliPosted Oct 29, 2013, 9:07 AM
Ravi ShekharPosted Oct 29, 2013, 7:49 AM