Manish Patat

Manish Patat

  • 2k
  • 37
  • 933

One Table Data Fill Thourgh Store Procedure

Jan 18 2021 7:37 AM
i have one table Like
 
 
I Have Main Master Table Like Data
 
 I Have Fill Master Table Data One table Through Store Procedure
My Store Procedure Here..
ALTER PROCEDURE [dbo].[RFM_SubOADetailDAtaAdd]
AS
BEGIN
Declare @Loop int,@Cnt int
set @Loop=0
select @cnt=Count(*) from SubOADetail
while(@Loop < @cnt)
BEGIN
Declare @Mouldcode nvarchar(15), @CastingDrg nvarchar(60),@CastingDrgRev nvarchar(4)=NULL
set @Loop=@Loop+1
Select @Mouldcode=MOULDCODE From SubOADetail
Select @CastingDrg=CastingDrg,@CastingDrgRev=CastingDrgRev From MouldDetails Where MOULDCODE=@Mouldcode
update SubOADetail set CastingDrg=@CastingDrg,CastingDrgRev=@CastingDrgRev where MOULDCODE=@Mouldcode
end
End
 
This Sp Was Execute But Not Change Data And message Warning Display Like
(7 row(s) affected)
Warning: Null value is eliminated by an aggregate or other SET operation.
 
Thanks in advance 
 
 
 

Answers (7)