-IF &LicenseNumber NE '' THEN GOTO LAB1; -ELSE IF &StartDate NE '' THEN GOTO LAB2; -ELSE GOTO LAB3; -LAB1 WHERE (Notice_Type EQ '&NoticeType' AND License_No EQ '&LicenseNumber') -GOTO ENDLAB; -LAB2 WHERE ( Processed_Date GE DT(&StartDate) AND Processed_Date LE DT(&EndDate) AND Notice_Type EQ '&NoticeType') -GOTO ENDLAB; -LAB3 WHERE ( Notice_Type EQ '&NoticeType') -ENDLABThis message has been edited. Last edited by: Erney,
WHERE (Notice_Type EQ '&NoticeType'); -IF &LicenseNumber NE '' THEN GOTO LAB1 -ELSE IF &StartDate NE '' THEN GOTO LAB2 -ELSE GOTO LAB3; -LAB1 WHERE (License_No EQ '&LicenseNumber'); -GOTO ENDLAB -LAB2 WHERE ( Processed_Date FROM DT(&StartDate) TO DT(&EndDate) ); -GOTO ENDLAB -LAB3 -ENDLAB
-SET &SEL1='FOC_NONE'; -SET &SEL2='{value}'; select * from {file} where {field1} eq '&SEL1' and {field2} eq '&SEL2'} ;
-SET &LicenseNumber =IF &LicenseNumber EQ '' THEN FOC_NONE ELSE &LicenseNumber; -SET &StartDate =IF &StartDate EQ '' THEN FOC_NONE ELSE &StartDate; WHERE (Notice_Type EQ '&NoticeType'); WHERE (License_No EQ '&LicenseNumber'); WHERE ( Processed_Date FROM DT(&StartDate) TO DT(&EndDate) );
-SET &SELECT=1; -SET &CAR =DECODE &SELECT(1 'JAGUAR' ELSE 'FOC_NONE'); -SET &COUNTRY =DECODE &SELECT(2 'W GERMANY' ELSE 'FOC_NONE'); TABLE FILE CAR PRINT CAR COUNTRY WHERE CAR EQ '&CAR'; WHERE COUNTRY EQ '&COUNTRY'; END
-SET &SELECT=2; -SET &CAR =IF &SELECT EQ 1 THEN 'JAGUAR' ELSE ''; -SET &COUNTRY=IF &SELECT EQ 2 THEN 'W GERMANY' ELSE ''; TABLE FILE CAR PRINT CAR COUNTRY -IF &COUNTRY NE '' GOTO COUNTRY; WHERE CAR EQ '&CAR'; -GOTO ENDRPT -COUNTRY WHERE COUNTRY EQ '&COUNTRY'; -ENDRPT END
In FOCUS Since 1983 ~ from FOCUS to WebFOCUS. Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206 |
quote:great minds think alike
"No one can do everything. But, if everyone does something then everything gets done." ~ Millicent
In FOCUS Since 1983 ~ from FOCUS to WebFOCUS. Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206 |
-SET &LicenseNumber =IF &LicenseNumber EQ '' THEN FOC_NONE ELSE &LicenseNumber; -SET &StartDate =IF &StartDate EQ '' THEN FOC_NONE ELSE &StartDate; WHERE (Notice_Type EQ '&NoticeType'); WHERE (License_No EQ '&LicenseNumber'); WHERE ( Processed_Date FROM DT(&StartDate) TO DT(&EndDate) );
IF &LicenseNumber EQ '' THEN FOC_NONE ELSE &LicenseNumber
That should not happen as FOC_NONE in a WHERE is removed by the interpreter regardless of the format as it never hits the DB.quote:In case of Numeric data, If you pass on FOC_NONE in where clause, You might end up with an error in certain DBs.