SQL Where clause in ORACLE

Posted by ArneRie on Stack Overflow See other posts from Stack Overflow or by ArneRie
Published on 2010-06-10T06:46:02Z Indexed on 2010/06/10 6:52 UTC
Read the original article Hit count: 312

Filed under:
|

Hi,

does someone has an idea, how to get END_DATE / START_DATE where TO_DATE('06/1/2010','MM/DD/YYYY') ?

SELECT "PROJECT"."ID", 
        "PROJECT"."CLIENT", 
        "PROJECT"."NAME", 
        "PROJECT"."STATE", 
        "PROJECT"."EARLIEST_START", 
        "PROJECT"."LATEST_END", 
        "PROJECT"."EFFORT", 
        "PROJECT"."LINK", 
        "PROJECT"."STATUS", 
        "PROJECT"."DESCRIPTION", 
        (SELECT SUM((END_DATE - START_DATE + 1) * (WORKLOAD / 100)) 
           FROM WORKITEM WHERE PROJECT = PROJECT.ID
        ) AS "P_A", 
        (SELECT COUNT(*) 
          FROM PUBLIC_HOLIDAY 
          WHERE HOLIDAY_DATE BETWEEN TO_DATE('06/1/2010','MM/DD/YYYY') AND 
                                   TO_DATE('06/2/2010','MM/DD/YYYY')) AS P_B,
        "PROJECT_STATE"."STATE", 
        "PERSON"."DISPLAY_NAME" AS "RESPONSIBLE" 
        FROM "PROJECT"
        INNER JOIN "PROJECT_STATE" ON PROJECT.STATE = PROJECT_STATE.ID
        INNER JOIN "PERSON" ON RESPONSIBLE = PERSON.ID WHERE (PROJECT.CLIENT = '1') AND (PROJECT.STATE = 1) ORDER BY "PROJECT"."NAME" ASC

© Stack Overflow or respective owner

Related posts about sql

Related posts about Oracle