icw1
November 5th, 2007, 09:55 AM
Hi,
I often have a problem Excluding records in Crystal as I am not sure of the syntax,
here is a SQL query that does exactly as i want. Can you tell me how to achieve the same record selection criteria in Crystal...many thanks
SELECT "OPMGR"."OPID", "OPMGR"."RECTYPE", "OPMGR"."COMPANY", "OPMGR"."STATUS", "OPMGR"."STARTDATE", "OPMGR"."CLOSEBY", "OPMGR"."STAGE"
FROM "GMSM_GMBASE"."dbo"."OPMGR" "OPMGR"
WHERE "OPMGR"."RECTYPE"='PK' AND ("OPMGR"."CLOSEBY">={ts '2007-01-01 00:00:00'} AND "OPMGR"."CLOSEBY"<{ts '2009-01-02 00:00:00'}) AND "OPMGR"."OPID" NOT IN (SELECT "OPMGR"."OPID" FROM "GMSM_GMBASE"."dbo"."OPMGR" "OPMGR" WHERE "OPMGR"."STAGE" = '(Templates)')
I often have a problem Excluding records in Crystal as I am not sure of the syntax,
here is a SQL query that does exactly as i want. Can you tell me how to achieve the same record selection criteria in Crystal...many thanks
SELECT "OPMGR"."OPID", "OPMGR"."RECTYPE", "OPMGR"."COMPANY", "OPMGR"."STATUS", "OPMGR"."STARTDATE", "OPMGR"."CLOSEBY", "OPMGR"."STAGE"
FROM "GMSM_GMBASE"."dbo"."OPMGR" "OPMGR"
WHERE "OPMGR"."RECTYPE"='PK' AND ("OPMGR"."CLOSEBY">={ts '2007-01-01 00:00:00'} AND "OPMGR"."CLOSEBY"<{ts '2009-01-02 00:00:00'}) AND "OPMGR"."OPID" NOT IN (SELECT "OPMGR"."OPID" FROM "GMSM_GMBASE"."dbo"."OPMGR" "OPMGR" WHERE "OPMGR"."STAGE" = '(Templates)')