error line 86 for stored procedure -


i trying stored procedure work. have been working month straight, till 3 last night, , approaching burnout. want work have ad campaign spent hundreds on sending traffic to.

use [redhotkitties2005db] go set ansi_nulls on go set quoted_identifier on go alter procedure [dbo].[proc_rhkprod_lock_items_for_paypal]     @cfuseridid bigint     ,@transaction_guid uniqueidentifier = null begin     set nocount on;      declare @tblcartid          bigint             ,@cfuserid          bigint             ,@tblproductsid     bigint             ,@quantity          bigint             ,@localinventoryid  varchar(100)             ,@taxologykey       bigint             ,@name              varchar(1000)             ,@shortdescription  varchar(8000)             ,@productdescription varchar(8000)             ,@uorlorul          varchar(2)             ,@unitprice         money             ,@shippingweight    numeric(6, 2)             ,@oversize          tinyint             ,@smallpic1         nvarchar(100)             ,@largepic1         nvarchar(100)             ,@smallpic2         nvarchar(100)             ,@largepic2         nvarchar(100)             ,@smallpic3         nvarchar(100)             ,@largepic3         nvarchar(100)      set @transaction_guid = coalesce(@transaction_guid,newid())      declare c1 cursor forward_only      select      rhkprod_tblcart.tablepk tblcartid                 ,rhkprod_tblproducts.productid tblproductsid                 ,rhkprod_tblcart.quantity                 ,rhkprod_tblproducts.localinventoryid                 ,rhkprod_tblproducts.name                 ,rhkprod_tblproducts.taxologykey                 ,rhkprod_tblproducts.shortdescription                 ,rhkprod_tblproducts.productdescription                 ,rhkprod_tblproducts.uorlorul                 ,rhkprod_tblproducts.unitprice                 ,rhkprod_tblproducts.shippingweight                 ,rhkprod_tblproducts.oversize                 ,rhkprod_tblproducts.smallpic1                 ,rhkprod_tblproducts.largepic1                 ,rhkprod_tblproducts.smallpic2                 ,rhkprod_tblproducts.largepic2                 ,rhkprod_tblproducts.smallpic3                 ,rhkprod_tblproducts.largepic3            rhkprod_tblcart     inner join  rhkprod_tblproducts     on          rhkprod_tblcart.tblproductsfk = rhkprod_tblproducts.productid           rhkprod_tblcart = @cfuserid        open c1      fetch next        c1        @tblcartid             ,@cfuserid             ,@tblproductsid             ,@quantity             ,@localinventoryid             ,@name             ,@taxologykey             ,@shortdescription             ,@productdescription             ,@uorlorul             ,@unitprice             ,@shippingweight             ,@oversize             ,@smallpic1             ,@largepic1             ,@smallpic2             ,@largepic2             ,@smallpic3             ,@largepic3 begin     while @@fetch_status = 0              insert rhkprod_tblpaypallock (                 ,[cfuserid]                 ,[transaction_guid]                 ,[timestamp]                 ,[tblproductsfk]                 ,[quantity]                 ,[localinventoryid]                 ,[name]                 ,[taxologykey]                 ,[shortdescription]                 ,[productdescription]                 ,[uorlorul]                 ,[unitprice]                 ,[shippingweight]                 ,[oversize]                 ,[smallpic1]                 ,[largepic1]                 ,[smallpic2]                 ,[largepic2]                 ,[smallpic3]                 ,[largepic3]             )             values (                 ,@cfuserid                 ,@transaction_guid                 ,getdate()                 ,@tblproductsid                 ,@quantity                 ,@localinventoryid                 ,@name                 ,@taxologykey                 ,@shortdescription                 ,@productdescription                 ,@uorlorul                 ,@unitprice                 ,@shippingweight                 ,@oversize                 ,@smallpic1                 ,@largepic1                 ,@smallpic2                 ,@largepic2                 ,@smallpic3                 ,@largepic3             )              update  rhkprod_tblproducts             set     quantity = quantity - @quantity               productid = @tblproductsid             ,     uorlorul in ('u','l')              fetch next                c1                @tblcartid                     ,@cfuserid                     ,@tblproductsid                     ,@quantity                     ,@localinventoryid                     ,@name                     ,@taxologykey                     ,@shortdescription                     ,@productdescription                     ,@uorlorul                     ,@unitprice                     ,@shippingweight                     ,@oversize                     ,@smallpic1                     ,@largepic1                     ,@smallpic2                     ,@largepic2                     ,@smallpic3                     ,@largepic3      close c1      deallocate c1 end end 

your insert statement has stray comma @ start:

insert rhkprod_tblpaypallock (                 ,[cfuserid] 

should be

insert rhkprod_tblpaypallock (                 [cfuserid] 

your values clause has stray comma:

values (     ,@cfuserid 

should be

values (     @cfuserid 

Comments

Popular posts from this blog

c++ - OpenCV Error: Assertion failed <scn == 3 ::scn == 4> in unknown function, -

php - render data via PDO::FETCH_FUNC vs loop -

The canvas has been tainted by cross-origin data in chrome only -