I have an sql statement that isn't returning all my information. While most of the info is the same, what I'm trying to do is return records if
wbs_name = award AND task_name = 'Execute Notice %'
or
wbs_name = Advertisment & Bidding AND task_name in ('Solicitation Posted %', 'Bid Opening', 'Obtain MDE%')
I am missing any of the award information.
Does anyone see what I did wrong?
wbs_name = award AND task_name = 'Execute Notice %'
or
wbs_name = Advertisment & Bidding AND task_name in ('Solicitation Posted %', 'Bid Opening', 'Obtain MDE%')
Code:
My Sql is:
select distinct
a.proj_id,
b.proj_catg_name,
b.Proj_catg_short_name,
c.wbs_name as cwbs,
extract(year from d.ACT_END_DATE) as YrEndDate,
To_Char(d.early_end_date, 'DD-MON-YYYY') as EarlyEndDate,
d.Task_name,
d.task_code,
d.Status_code,
to_Char(D.ACT_START_DATE,'DD-MON-YYYY') as TaskActStart,
To_Char(d.act_end_date,'DD-MON-YYYY') as TaskActEnd,
e.Proj_Short_Name as ProjShortName
from admuser.projpcat a, admuser.pcatval b, admuser.projwbs c, admuser.task d, admuser.project e
where
C.PROJ_ID = A.PROJ_ID
AND B.PROJ_CATG_ID = A.PROJ_CATG_ID
AND d.proj_id = a.proj_id
and e.proj_id = a.proj_id
AND E.PROJ_SHORT_NAME LIKE 'A6 IDIQ ESA%'
AND E.PROJ_SHORT_NAME NOT LIKE '%-%'
and b.proj_catg_name = 'IDIQ'
and
(
(
d.TASK_NAME like 'Execute Notice of Award (NOA)'
and C.WBS_NAME ='Award'
)
OR
(
(
d.TASK_NAME like 'Solicitation Posted on CBR'
Or d.tASK_NAME like 'Award *'
Or d.TASK_NAME like 'Bid Opening'
Or d.TASK_NAME like 'Obtain MDE approval Prior to Contract Award'
)
AND C.WBS_NAME Like 'Advertisement '||chr(38)|| ' Bidding' --<>'award'
)
)
--and e.Proj_id = '9917'
and e.proj_id = '9918'
--and d.task_code Not Like Upper('x%')
and extract(year from d.ACT_END_DATE) >= '2011'
order by task_code
Does anyone see what I did wrong?