Projected Load Analysis for Demand Graph: Difference between revisions

From KeystoneIntranet
Jump to navigation Jump to search
Intra>User
m (1 revision imported)
 
m (1 revision imported)
 
(No difference)

Latest revision as of 13:00, 14 July 2023

Simple Analysis

Simple Project Load Query:

select * from ditprjld
where tgt_depart_dt between :sched_date and 1+:sched_date


Simple Demand Graph Procedure Query:

select * from dip_truckdemand(:Schedule_Date,1+:Schedule_Date,.25+:Schedule_Date)

NOTE: Assumes 6 a.m. as current time.


Advanced Analysis

select 
l.plant_no,o.will_call_flag,tgt_depart_dt Dept_Return_dt,1 "Change",o.cust_no,o.order_code,load_no,cast(tgt_depart_dt as time) Depart,cast(tgt_return_dt as time) Return,floor(.5+(tgt_return_dt-tgt_depart_dt)*1440) Time_Out_Min from ditprjld l
inner join artordhd o on l.order_session_no=o.session_no and l.order_trans_no=o.trans_no
where cast(tgt_depart_dt as date)=:Demand_Date
   union
select 
l.plant_no,o.will_call_flag,tgt_return_dt Dept_Return_dt,-1 "Change",o.cust_no,o.order_code,load_no,cast(tgt_depart_dt as time) Depart,cast(tgt_return_dt as time) Return,floor(.5+(tgt_return_dt-tgt_depart_dt)*1440) Time_Out_Min from ditprjld l
inner join artordhd o on l.order_session_no=o.session_no and l.order_trans_no=o.trans_no
where cast(tgt_depart_dt as date)=:Demand_Date