SELECT
PMEQMT.EPLANT_ID
Inside the table PMEQMT.EPLANT_ID we have two EPLANTS_ID's 1 and 2
All I need to do is to choose a certain Eplant_id 1 or 2
I tried SELECT PMEQMT.EPLANT_ID = '2' but my SQL checker gave me an error that didn’t help me. I am sure this is basic; I am new to SQL kinda sorta... Thx for any and help!!
Mathew
The Autism MX Project
the complete code
SELECT
SUBSTR("PMEQMT"."EQNO",1,10) EQNO,
"PMEQMT"."CLASS",
ROUND("PMJOB"."TOTAL_UNITS",0) ACTUAL,
SUBSTR("PMJOB"."UOM",1,8) UOM,
SUBSTR("PMJOB"."ACT_EVERY",1,10) PLANNED,
SUBSTR("PMTASKS"."DESCRIP",1,60) TASK_DESC,
ROUND((("PMJOB"."TOTAL_UNITS"/"PMJOB"."ACT_EVERY")*100),0) PERCENTAGE,
PMEQMT.EPLANT_ID
FROM
"IQMS"."PMEQMT" "PMEQMT",
"IQMS"."PMJOB" "PMJOB",
"IQMS"."PMTASKS" "PMTASKS"
WHERE
"PMEQMT"."ID" = "PMJOB"."PMEQMT_ID"(+) AND
"PMJOB"."PMTASKS_ID" = "PMTASKS"."ID"(+) AND
("PMEQMT".PK_HIDE IS NULL OR
"PMEQMT"."PK_HIDE" = 'N') AND
("PMEQMT"."CLASS" = 'MT' or "PMEQMT"."CLASS" = 'TL') AND
("PMJOB"."TOTAL_UNITS"/"PMJOB"."ACT_EVERY")>.9 and
("PMJOB"."TOTAL_UNITS"/"PMJOB"."ACT_EVERY")<1.
ORDER BY
PMEQMT.EQNO ASC,
PMTASKS.DESCRIP ASC
Well I figured out that I cant make the choice in the SELECT part of the code. I am assuming my choice of a certain EPLANT would be in the WHERE part of the code. Am I getting closer???