Hello all, I am trying to setup a record selection that uses a parameter to query a field called Workorder.phone on an Oracle 8.1 database. My goal is to report on all records that do not have ie, '11/06', in the Workorder phone field. So far, I've managed to pull the records that do not have '11/06' in this field, but I know there are many more records, of which all of them are empty, or Null. Below is the record selection I'm using.
If {?PHONE} <> "NONE" then
if isnull({WORKORDER.PHONE}) then
{WORKORDER.PHONE} <> {?PHONE}
else If {?PHONE} = "NONE"then
true
)
Here is the Show SQL:
SELECT
WORKORDER."WONUM", WORKORDER."STATUS", WORKORDER."WORKTYPE", WORKORDER."DESCRIPTION", WORKORDER."HISTORYFLAG", WORKORDER."WOPRIORITY", WORKORDER."PHONE", WORKORDER."WOPM1", WORKORDER."ESTATAPPRLABHRS"
FROM
"GAFMAX"."WORKORDER" WORKORDER
WHERE
WORKORDER."WOPM1" = 'SH' AND
WORKORDER."PHONE" IS NULL AND
WORKORDER."PHONE" <> '11/06' AND
WORKORDER."STATUS" <> 'COMP' AND
(WORKORDER."WOPRIORITY" = 3 OR
WORKORDER."WOPRIORITY" = 1) AND
WORKORDER."HISTORYFLAG" = 'N'
The Show SQL looks good to me, in that it should do what I expect it to, but the records with an empty workorder.phone are not being returned. Any ideas would be greatly appreciated. Thank you all. Daniel
If {?PHONE} <> "NONE" then
if isnull({WORKORDER.PHONE}) then
{WORKORDER.PHONE} <> {?PHONE}
else If {?PHONE} = "NONE"then
true
)
Here is the Show SQL:
SELECT
WORKORDER."WONUM", WORKORDER."STATUS", WORKORDER."WORKTYPE", WORKORDER."DESCRIPTION", WORKORDER."HISTORYFLAG", WORKORDER."WOPRIORITY", WORKORDER."PHONE", WORKORDER."WOPM1", WORKORDER."ESTATAPPRLABHRS"
FROM
"GAFMAX"."WORKORDER" WORKORDER
WHERE
WORKORDER."WOPM1" = 'SH' AND
WORKORDER."PHONE" IS NULL AND
WORKORDER."PHONE" <> '11/06' AND
WORKORDER."STATUS" <> 'COMP' AND
(WORKORDER."WOPRIORITY" = 3 OR
WORKORDER."WOPRIORITY" = 1) AND
WORKORDER."HISTORYFLAG" = 'N'
The Show SQL looks good to me, in that it should do what I expect it to, but the records with an empty workorder.phone are not being returned. Any ideas would be greatly appreciated. Thank you all. Daniel