DB_51aspx/NewWeb.sql

(开头部分) 14.78MB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

USE [NewWeb-20131108]
GO
/****** Object:  StoredProcedure [dbo].[proc_K_M_ScoreGoodsCateSet]    Script Date: 06/27/2015 10:11:52 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author:		<Author,,Name>
-- Create date: <Create Date,,>
-- Description:	<Description,,>
-- =============================================
CREATE PROCEDURE [dbo].[proc_K_M_ScoreGoodsCateSet]
	@TranType VARCHAR(20)=NULL,
	@SetValue INT=NULL,
	@IDList VARCHAR(500)=NULL
AS
IF UPPER(@TranType)='DEL'
BEGIN
	declare @sql varchar(100)
	set @sql = 'UPDATE K_Category SET IsDel = 1 WHERE ID IN (' + @IDList + ')'
	exec(@sql)
END
GO
/****** Object:  StoredProcedure [dbo].[proc_insert]    Script Date: 06/27/2015 10:11:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROC [dbo].[proc_insert] (@tablename varchar(256))
as
begin
       set nocount on
       --declare @tablename varchar(256)
       --set @tablename = 'AD'
       declare @sqlstr varchar(max)
       declare @sqlstr1 varchar(max)
       declare @sqlstr2 varchar(max)
       declare @objectId int 
	   declare @ident int 

       set @objectId=object_id(@tablename) 
       select @ident=status&0x80 from syscolumns where id=@objectid and status&0x80=0x80 
       if @ident is not null 
			select 'SET IDENTITY_INSERT '+@TableName+' ON '
	   else
			select ''
			
	   select @sqlstr='select ''insert '+@tablename
       select @sqlstr1=''
       select @sqlstr2=' ('
       select @sqlstr1= ' values ( ''+'
       select @sqlstr1=@sqlstr1+col+'+'',''+' ,@sqlstr2=@sqlstr2+ '[' + name + ']' +',' from (select case 
--     when a.xtype =173 then 'case when '+a.name+' is null then ''NULL'' else '+'convert(varchar('+convert(varchar(4),a.length*2+2)+'),'+a.name +')'+' end'
       when a.xtype =104 then 'case when ['+a.name+'] is null then ''NULL'' else '+'convert(nvarchar(1),['+a.name +'])'+' end'
       when a.xtype =175 then 'case when ['+a.name+'] is null then ''NULL'' else '+'''''''''+'+'replace(['+a.name+'],'''''''','''''''''''')' + '+'''''''''+' end'
       when a.xtype =61  then 'case when ['+a.name+'] is null then ''NULL'' else '+'''''''''+'+'convert(nvarchar(23),['+a.name +'],121)'+ '+'''''''''+' end'
       when a.xtype =106 then 'case when ['+a.name+'] is null then ''NULL'' else '+'convert(nvarchar('+convert(varchar(4),a.xprec+2)+'),['+a.name +'])'+' end'
       when a.xtype =62  then 'case when ['+a.name+'] is null then ''NULL'' else '+'convert(nvarchar(23),['+a.name +'],2)'+' end'
       when a.xtype =56  then 'case when ['+a.name+'] is null then ''NULL'' else '+'convert(nvarchar(11),['+a.name +'])'+' end'
后面还有 1359+ 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。