viw_gl_price_history.sql
来自「工厂采购系统,DELPHI+SQL SERVER,三层技术」· SQL 代码 · 共 25 行
SQL
25 行
if object_id('dbo.GL_Price_history') is not null
drop view dbo.GL_Price_history
go
create view GL_Price_history
as
select (select count(*) from viw_Price_History where hpn =
a.hpn and cpn = a.cpn and modify_dt<=a.modify_dt) as Item,
a.Order_Number,a.hpn,a.cpn,a.unit_Price,a.Currency,a.Creation_dt,a.Modify_dt
from viw_Price_History a
go
/*
select * from GL_Price_history
where hpn ='001633100100-CS007'
order by creation_dt,modify_dt,item
*/
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?