jamie_moore
New Member
Hi,
I'm trying to use the wildcard "*" with the variable cReasonCode so that in the Where clause when you enter "*" it matches all records. Currently it's literally searching for the character "*" and not treating it as a wildcard. Any help would be greatly appreciated.
DEFINE VARIABLE iCompany AS INTEGER FORMAT ">>" NO-UNDO LABEL "Company"
Code"
/* Prompt for user input */
UPDATE iCompany HELP "10=HSC, 20=Wardles"
iDepot HELP "Enter Depot"
daStartDate HELP "Start date(?=date will be set at runtime)"
daEndDate HELP "End date(?=date will be set at runtime)"
cAdjustType HELP "All=*, Receipt=skrc*, Issue=skis*, Adjust=skaj*"
cReasonCode HELP "Enter Reason Code of '*' for all"
deThreshold HELP "Enter value on wich to exclude adjustments"
WITH 1 COLUMNS FRAME USER-PROMPT TITLE "STOCK ADJUSTMENT REPORT" CENTERED
ROW FRAME-ROW(USER-PROMPT) + 8.
OUTPUT TO "/upgrade/Jamie-SKR520.txt" LANDSCAPE.
FOR EACH stkadj-reas NO-LOCK WHERE company = iCompany AND reason-code =
cReasonCode:
DISPLAY reason-code reason-desc.
END.
OUTPUT CLOSE.
I'm trying to use the wildcard "*" with the variable cReasonCode so that in the Where clause when you enter "*" it matches all records. Currently it's literally searching for the character "*" and not treating it as a wildcard. Any help would be greatly appreciated.
DEFINE VARIABLE iCompany AS INTEGER FORMAT ">>" NO-UNDO LABEL "Company"
INIT "10".
DEFINE VARIABLE iDepot AS INTEGER FORMAT ">>" NO-UNDO LABEL "Depot"INIT "2".
DEFINE VARIABLE daStartDate AS DATE NO-UNDO LABEL "Start Date"INIT " / / ".
DEFINE VARIABLE daEndDate AS DATE NO-UNDO LABEL "End Date"INIT " / / ".
DEFINE VARIABLE cAdjustType AS CHARACTER NO-UNDO LABEL "Adjust Type"INIT "*".
DEFINE VARIABLE cReasonCode AS CHARACTER FORMAT "x(3)" NO-UNDO LABEL "ReasonCode"
INIT "*".
DEFINE VARIABLE deThreshold AS DECIMAL FORMAT ">>9.99" NO-UNDO LABEL "Threshold"INIT "0.00".
/* Prompt for user input */
UPDATE iCompany HELP "10=HSC, 20=Wardles"
iDepot HELP "Enter Depot"
daStartDate HELP "Start date(?=date will be set at runtime)"
daEndDate HELP "End date(?=date will be set at runtime)"
cAdjustType HELP "All=*, Receipt=skrc*, Issue=skis*, Adjust=skaj*"
cReasonCode HELP "Enter Reason Code of '*' for all"
deThreshold HELP "Enter value on wich to exclude adjustments"
WITH 1 COLUMNS FRAME USER-PROMPT TITLE "STOCK ADJUSTMENT REPORT" CENTERED
ROW FRAME-ROW(USER-PROMPT) + 8.
OUTPUT TO "/upgrade/Jamie-SKR520.txt" LANDSCAPE.
FOR EACH stkadj-reas NO-LOCK WHERE company = iCompany AND reason-code =
cReasonCode:
DISPLAY reason-code reason-desc.
END.
OUTPUT CLOSE.