I have stored proc1 sp_DateFromRange which returns date.
I have another stored proc2 which returns table with other data..storedproc2 has date parameters @datefrom and @dateto.
Now, i need to assign storedproc1 to @datefrom in storedproc2
Is it possible to assign
Not, it’s not possible the way you wished.
Here’s interesting article on how to share data between stored procedures
How to Share Data between Stored Procedures
In my opinion, the simplest way is to use output parameter or temp table. For more info check the link. Here’s a simple way of using output parameter.
Here’s another simple example of using temp table for getting result set from a stored procedure
You could also use shared temp table. You will find implementation in article I’ve provided.
Good Luck!