Quantcast
Channel: Microsoft SQL Server
Viewing all articles
Browse latest Browse all 4871

T SQL - Passing table rows in a stored procedure

$
0
0

Good afternoon all!

Say I have a stored procedure....

exec my_sp ?,?

I can execute this stored procedure by adding two values e.g.

exec my_sp 'value 1','value 2'

Now this is where things get tricky.....

I have a table for example

1  |  2

aa   bb

cc   dd

and so on.......

Now I want to pass my table values through and create one table of results e.g.

exec my_sp 'aa','bb'

exec my_sp 'cc','dd'

and so on..........

Is this possible?


Viewing all articles
Browse latest Browse all 4871

Trending Articles



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