TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Manish Patat
1.7k
68
7.6k
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
Reply
Answers (
7
)
Efficient query writing
i want in sql one query