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
ahmed elbarbary
NA
1.6k
278k
How to use Cursor to Execute stored procedure where featurevalue is b?
Dec 20 2020 12:03 PM
How to use Cursor to Execute stored procedure where featurevalue is bigger than 0 ?
I work on SQL server 2012 . I face issue I can't use cursor to execute stored procedure when feature value is bigger than 0 .
I have stored procedure must execute with every line where feature value is bigger than 0
so according to my case I will use cursor to execute stored procedure with feature value that bigger than 0
so EXEC sp_updatevaluesonTables 10,30,40,50
this sp pass to it feature value to do some thing update and insert data
so How to use cursor to execute stored procedure sp_updatevaluesonTables with every value bigger than 0
as
cursor
EXEC sp_updatevaluesonTables 10,30,40,50
end cursor
im not use cursor before so can you help me
create
table
#updatestatus
(
FeatureValue
int
,
status nvarchar(50)
)
insert
into
#updatestatus
values
(10,
NULL
),
(50,
NULL
),
(-2,
NULL
),
(-3,
NULL
),
(30,
NULL
),
(40,
NULL
)
SELECT
*
FROM
#updatestatus
WHERE
FeatureValue>0
Exec
sp_updatevaluesonTables FEATUREVALUE
Reply
Answers (
2
)
How to pivot Feature values On Features based on parts Exist on table
How to get parts that not have same features count on table settings b