using SQL to edit DREAM writer Data selection values

Eric Lehti

VIP Member
Issue: I want to specify *TODAY + 1 (i.e. tomorrow's date) in a bunch of DREAM writer versions. But we are still on an older version of World that does not allow Date arithmetic specification in DREAM writer. Oh well here is my workaround ('cuz why upgrade to a modern version A92 when we can continue to put bandages on an old "steeenking" 11-year old ERP package." Still chafing at A73.9

I code tomorrow's date July 24, 2009 (julian date 109205) into the appropriate record. My SQL statement:
update F98301 set desvl='109205'
WHERE DEPID ='P42520' and
DEVERS like 'SLEEPZ%' and
DETY='S' and DESQN=64
8 rows updated in F98301 in AMSCOM.
+++++++++++++++++++++++++++++++++
98302 Data Selection Form ID. . . . P42520
Version. . . . SLEEPZ410
Print Pick Slips - MCU 410

I Explanation . . Selection . .
N Rel. Value
Y Address Number . . . . . . . . . . . . . EQ *ALL
And Y Order Type . . . . . . . . . . . . . . . EQ *ALL
And Y Order Number . . . . . . . . . . . . . . EQ *ALL
And Y Status Code - Next . . . . . . . . . . . EQ 550
And Y Business Unit. . . . . . . . . . . . . . EQ 410
And Y Promised Delivery. . . . . . . . . . . . LE 07/24/09
 
Try this:

Cast('1' || Substr(Digits(Year(CURDATE() + 1 day)),9,2) ||
Substr(Digits(DayOfYear(CURDATE() +1 day)),8,3) As Dec(6,0))

to derive the JDE Julian date.
 
Back
Top