Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello my friends. I cannot figure out why the code below is not working. I am simply trying to filter my results by a date variable.
LOAD LTRIM(RTRIM(PHPCTL)) AS PickticketCtrlNum,
LTRIM(RTRIM(PHPGDT)) AS PktGenerationDate,
LTRIM(RTRIM(PHPRWV)) AS PrintWave,
LTRIM(RTRIM(PHMIS1)) AS MiscIns5Byte1,
LTRIM(RTRIM(PHMIS4)) AS MATCH,
LTRIM(RTRIM(PHSC3)) AS SpecialInsCode3,
LTRIM(RTRIM(PHSOTO)) AS Soldto,
LTRIM(RTRIM(PHSHTO)) AS Shipto,
LTRIM(RTRIM(PHSONM)) AS SoldtoName,
STARTSHIPDATE,
STOPSHIPDATE,
SHIPDATE,
LTRIM(RTRIM(PHSVIA)) AS PlannedShipVia,
LTRIM(RTRIM(PHSVID)) AS ShipViaDesc,
LTRIM(RTRIM(PHPHLF)) AS PackAndHoldFlag,
LTRIM(RTRIM(PHCUPO)) AS CustPONum,
LTRIM(RTRIM(PHTCT)) AS TotNbrOfCartons,
LTRIM(RTRIM(PHTUTS)) AS TotNbrOfUnits,
LTRIM(RTRIM(PHSHDT)) AS ORIGINALSHIPDATE,
LTRIM(RTRIM(LXLDNO)) AS LoadNumber,
LTRIM(RTRIM(LXSHNO)) AS ShipmntNumber,
LTRIM(RTRIM(PDPAKU)) AS UnitsPacked,
LTRIM(RTRIM(PDPRC)) AS Price,
LTRIM(RTRIM(PDSEA)) AS SEASON,
LTRIM(RTRIM(PDBCHN)) AS LotNum,
LTRIM(RTRIM(PDSYR)) AS SeasonYear,
LTRIM(RTRIM(PDSTYL)) AS Style,
PDBCHN*PDPAKU AS Ext_Retail,
PDBCHN*PDPAKU*0.425 AS Ext_Cost
WHERE SHIPDATE >= $(zconvDate)
;
HI
Try like this
Did u declare zconvDate
in Set or let?
if you declare in let, then WHERE SHIPDATE >= '$(zconvDate)';
And also, check the shipdate and zconvDate
is in same date format?
Additional information:
Instead of ltrim(rtrim()) option use trim() function