Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

can we used CTE to execute Stored procedure & avoide use of cursor ?

$
0
0

Hello All,

I have one table having column , which is having mandatory parameter for stored proceduresp_send_dbmail.

like ProfilerName,Receiver,Body etc.

Table having 10 tuple with correct and valid data.

I want to execute sp_send_dbmail for every tuple/row value i.e for 10 times.

Now m using cursor to this task.

I want to avoide cursor.

As I know we can use CTE for iterative / repetative purpose also.

Can we use CTE for current scenario ?/ If I don't want to use Cursor. What will be the another option to do these ?

Please help me on same !!




Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>