viw_price_list.sql

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

SQL
23
字号
if object_id('dbo.Viw_Price_List') is not null
drop view dbo.Viw_Price_List
go


create view Viw_Price_List
as
select (select count(*) from  PO_Price_Mstr where 
isnull(hpn,'')<>'' and 
hpn=a.hpn --and moq = a.moq
and item = a.item
and line<=a.line ) as Item,a.hpn,a.CPN,convert(numeric(18,8),a.Unit_Price) as Unit_Price,a.Currency,
a.MoQ,a.Effective_dt,a.Expire_dt as Expiration_dt,
a.vendor_id,b.vendor_nm

from PO_Price_Mstr a ,PO_vendor_Mstr b where a.vendor_id =b.Vendor_ID
and isnull(a.hpn,'')<>''



-- select * from Viw_Price_List order by hpn

⌨️ 快捷键说明

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