SQL代码:
USE [ZE]
GO
/****** Object: StoredProcedure [dbo].[UP_MainBusiness] Script Date: 04/11/2012 11:01:37 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
--============================================================
--用途:主营业务分析表
--作者:龚德辉
--日期:2012-04-10
--============================================================
Create PROCEDURE [dbo].[UP_MainBusiness]
AS
BEGIN
/*主营业业务收入*/
create table #mainbusiness
(
item nvarchar(20)
,saletype nvarchar(10)
,Jan decimal(18,2) DEFAULT (0)
,Jan1 decimal(18,2) DEFAULT (0)
,Feb decimal(18,2) DEFAULT (0)
,Feb1 decimal(18,2) DEFAULT (0)
,Mar decimal(18,2) DEFAULT (0)
,Mar1 decimal(18,2) DEFAULT (0)
,Apr decimal(18,2) DEFAULT (0)
,Apr1 decimal(18,