viw_price_chg_log.sql

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

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

create view Viw_Price_Chg_Log
as
select (select count(*) from po_price_log
where hpn = a.hpn  and modify_dt <=modify_dt) as Item,
a.HPN,a.Status,a.Old_Price,a.New_Price,a.modify_dt,a.modified_by
from po_price_log a

/*

select * from Viw_Price_Chg_Log

*/

⌨️ 快捷键说明

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