Author: RahulG31
Subject: Reply to: Need help on a SQL query
Posted: Fri Jul 22, 2016 12:10 am (GMT 5.5)
It seems that an Org_id can have multiple status ACT and INACT (both at the same time) with end_dt as null. It doesn't look logical if you are not using company code in query.
And your subquery is of No help either.
and also just clarify if you have org_id as key (which can't be the case as I see multiple) OR is it a composite key of multiple columns.
.
Subject: Reply to: Need help on a SQL query
Posted: Fri Jul 22, 2016 12:10 am (GMT 5.5)
It seems that an Org_id can have multiple status ACT and INACT (both at the same time) with end_dt as null. It doesn't look logical if you are not using company code in query.
And your subquery is of No help either.
and also just clarify if you have org_id as key (which can't be the case as I see multiple) OR is it a composite key of multiple columns.
.