viw_price_selection.sql

来自「工厂采购系统,DELPHI+SQL SERVER,三层技术」· SQL 代码 · 共 20 行

SQL
20
字号
if object_id('dbo.Viw_Price_Selection') is not null
drop view dbo.Viw_Price_Selection
go
create view Viw_Price_Selection
as
select   (select count(*) from PO_Price_mstr  where isnull(hpn,'')<>'' 
and hpn = a.hpn  and Itemseq <= a.itemseq ) as Item,
a.Vendor_id,b.Vendor_nm,a.hpn,a.CPN,convert(float,a.unit_Price) as Unit_Price,
a.Currency,a.Effective_dt,a.Expire_dt as[Expiration_dt],a.MOQ,a.MPQ
from  PO_Price_Mstr a ,po_vendor_mstr b 
where a.vendor_id = b.vendor_id and isnull(hpn,'')<>''


/*

select * from Viw_Price_Selection where hpn ='070710450621-CE008'

select * from po_price_mstr where hpn ='070710450621-CE008'

*/

⌨️ 快捷键说明

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