alter function getPrice(@packkg float,@PID nvarchar(50),@Express int) returns float
as
begin
declare @pprice float
  select @pprice=(BC+((@packkg-AC)*DC)/CC) from PPrice where PID=@PID and Express=@Express
return  round(isnull(@pprice,0),0)
end

CREATE TABLE [dbo].[PPrice] (
 [Gid] [int] IDENTITY (1, 1) NOT NULL ,
 [PID] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
 [Express] [int] NULL ,
 [AC] [float] NULL ,
 [BC] [float] NULL ,
 [CC] [float] NULL ,
 [DC] [float] NULL ,
 [Gdate] [datetime] NULL
) ON [PRIMARY]
GO

 

posted on 2011-08-25 23:29 sanmao 阅读(1242) 评论(0)  编辑  收藏

只有注册用户登录后才能发表评论。


网站导航:
 

常用链接

留言簿(5)

随笔分类

随笔档案

搜索

  •  

最新评论

阅读排行榜

评论排行榜