ALTER PROCEDURE [dbo].[P_DeleteRepeatRecord]@siteName varchar(50),@goodsId varchar(20)ASBEGINdeclare @SelectSql varchar(MAX),@tableName varchar(50)set @tableName='goods_price_history_'+@siteNameset @SelectSql='declare my_cursor cursor scroll for select id,goods_price,createDate from ' Read More
ALTER PROCEDURE [dbo].[P_ComparePrice]@siteName varchar(50),@goodsId varchar(max)ASBEGIN DECLARE @splitChar CHAR(1) DECLARE @IDS VARCHAR(20) SET @splitChar = ',' WHILE(charindex(@SplitChar,@goodsId)<>0)----当分隔符的索引不等于0时 BEGIN SET @IDS=SUBSTRING(@goodsId,1,charindex(@splitChar,@goodsId)- Read More
createPROCEDURE [dbo].[GetGoodsIDList]@siteID int,@pageSize int,@pageIndex intASBEGINSELECT ID FROM (SELECT ROW_NUMBER() OVER(ORDER BY ID asc) AS NUM,ID FROM goods_products where siteid=@siteID) TBWHERE NUM>=@pageSize*(@pageIndex-1) AND NUM<= @pageSize*@pageIndexEND Read More