SSRS and Cursors

Can you have cursors in your query when creating a report in SSRS, or do you need to created a stored procedure and execute?
stevendeveloperAsked:
Who is Participating?
 
ValentinoVBI ConsultantCommented:
I know you can write more than just a select in the query part of your dataset.  So a cursor might work as well, as long as your code ends with a SELECT statement to return your data.

However, are you sure you need a cursor?  If you explain what you want to do, perhaps we can help you write it differently.

If you do need a cursor, I would also recommend to put that in a stored proc.
0
 
TempDBACommented:
you can give it a try. Best way is hit and trial. Write a simple cursor and try.
But I will still prefer stored procedure because the plan is cached. And why not create stored procedure with cursor?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.