Click here to Skip to main content
15,887,350 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Dear Sir,

I want how to select stored procedure data in select statement in sqln servere

My coding:

select * into #tempresult from
exec OB_Course_Seats 'MC',0,-1

This above Temp table Runned select * from #tempresult below result came.

I want to belowResult:
Course_code
HV_C
HV

What I have tried:

select * into #tempresult from
exec OB_Course_Seats 'MC',0,-1
Posted
Updated 28-Feb-17 2:55am
Comments
Karthik_Mahalingam 28-Feb-17 7:15am    
what is the issue ?
Nirmal Chandru 28-Feb-17 7:20am    
I want Below Query wise result
sp_name -->Storeprocedure Name

Sql Query:
SELECT sp.Column1,sp.Column2,sp.Column3, t.column1,t.column2
FROM sp_name (any Argumnets) sp INNER JOIN table2 t ON t.no = sp.no
Karthik_Mahalingam 28-Feb-17 7:42am    
use temp table

1 solution

This article lists various ways you could achieve this:
How to share data between stored procedures[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900