⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 migration_last_po.sql

📁 工厂采购系统,DELPHI+SQL SERVER,三层技术
💻 SQL
字号:
insert into PO_Quo_References
(vendor_id,
 Order_Number,
 HPN,
 unit_price,
 Currency,
 moq,
 Modify_dt
)
 
select a.id,max(b.pono) as PONO,b.hpn,b.unitprice,b.curunit,b.moq,max(created_dt) as creation_dt
from ord_mst a,ord_item b
where a.pono = b.pono and isnull(b.hpn,'')<>''
group by a.id,b.hpn,b.unitprice,b.curunit,b.moq
order by a.id,b.hpn

update  po_quo_references 
	set cpn = b.cpn
from po_quo_references a,
ord_item b
where a.Order_number = b.pono and a.hpn = b.hpn
and isnull(b.cpn,'')<>''

delete  from po_quo_references where order_number 
 like 'PO-%' or order_number like 'WJ%'

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -