Business Process Automation
Add From-Where Clause
This page is accessed via Business Process Automation > Agents and Milestones > Milestone Template. Click Add Milestone. Click Add From-Where Clause.
The default From Clauses and Where Clauses, listed below, generate Structured Query Language (SQL) select statements that replicate shipment details for all stops or all equipment types and all lines for either an order base or order release.
Replication For |
Default From Clause |
Default Where Clause |
---|---|---|
Stops |
select ss.stop_num from shipment s, shipment_stop ss |
where s.shipment_gid = ss.shipment_gid |
Equipment |
select se.s_equipment_gid from shipment s, shipment_s_equipment_join se |
where s.shipment_gid = se.shipment_gid |
Order Base Line |
select obl.ob_line_gid from ob_order_base ob, ob_line obl |
where ob.order_base_gid = obl.order_base_gid |
Order Release Line |
select orl.order_release_line_gid from order_release ord, order_release_line orl |
where ord.order_release_gid = orl.order_release_gid |
You can enter and append SQL code to the default From and Where Clauses to limit the stops, equipment, or lines for which shipment, order base line, and order release details are replicated. For example, you could add AND SS.STOP_NUM = 1 to the Where Clause for stops so that shipment details would be replicated for only the first stop of shipments.
Appending the From and Where Clauses requires a knowledge of SQL coding.
Adding SQL
- Enter the From Clause.
- Enter the Where Clause.
- Click View Query to preview the query.
- Click Submit.