would appreciate it if someone could help.Got a request to change logic in this, but not sure how.--CPS CALCUALTIONS--Scheduled Date = Earliest of MFG_NEED and CURR_LATE_FINISHprint 'PROCESS TOLLGATE TG500-1 CALCULATIONS'goupdate tg500_1set required_date = convert(char, tmp1.scheduled_date, 101)from tg500_1, (select distinct record_num, min(scheduled_date) as scheduled_date from (select record_num, mfg_need as scheduled_date from tg500_1 where mfg_need is not null union select record_num, curr_late_finish as scheduled_date from tg500_1 where curr_late_finish is not null) tmp group by record_num) tmp1where tg500_1.record_num = tmp1.record_num
here is logic change.Current logicSchedule date = Earliest of MFG_NEED and CURR_LATE_FINISHRevised LogicSchedule date = MFG_NEED if MFG_NEED empty CURR_LATE_FINISH