Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select
- issue.material_movement_id,
- issue.material_movement_line_id,
- issue.material_movement_per_size_id,
- issue.from_locator_erp_id,
- issue.to_locator_erp_id,
- issue.po_buyer,
- issue.item_id,
- issue.c_order_id,
- issue.uom,
- issue.size,
- issue.qty_per_size,
- issue.status,
- issue.movement_date,
- issue.warehouse_id,
- issue.is_integrate,
- issue.integration_date,
- coalesce(issue.item_id_source, item_id) as item_id_source
- from
- dblink( 'dbname=wmsacc port=5432 host=192.168.51.22 user=dev password=Pass@123',
- 'select * from material_out_issue_mv where is_integrate=false and integration_date is null and status_mo=true') issue (material_movement_id char(36),
- material_movement_line_id char(36),
- material_movement_per_size_id char(36),
- from_locator_erp_id integer,
- to_locator_erp_id integer,
- po_buyer varchar(255),
- item_id varchar(255),
- c_order_id varchar(255),
- uom varchar(255),
- size varchar(255),
- qty_per_size numeric,
- status varchar(255),
- movement_date timestamp without time zone,
- warehouse_id numeric,
- is_integrate boolean,
- integration_date timestamp without time zone,
- item_id_source varchar(255),
- status_mo boolean)
- where
- trunc(issue.movement_date)>= '2020-04-07'::timestamp
- and not exists (
- select
- 1
- from
- PP_Cost_Collector
- where
- Description = issue.material_movement_per_size_id
- and DocStatus = 'CO')
- order by
- 1 asc,
- 2 asc,
- 3 asc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement