Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
SanjaySutar
Starting Member
18 Posts |
Posted - 2008-04-09 : 07:01:34
|
| How to return an entire table from stored procedure ????thanx in advance |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-04-09 : 07:11:15
|
UseSELECT * FROM Table E 12°55'05.25"N 56°04'39.16" |
 |
|
|
SanjaySutar
Starting Member
18 Posts |
Posted - 2008-04-10 : 21:35:25
|
| Hi thanx 4 the replyBut i just want to retun entire table as a single object from astored procedure |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-04-11 : 01:52:29
|
CREATE PROCEDURE dbo.uspMyProcedureASSELECT * FROM Table E 12°55'05.25"N 56°04'39.16" |
 |
|
|
jezemine
Master Smack Fu Yak Hacker
2886 Posts |
Posted - 2008-04-11 : 02:20:36
|
if you mean you want to return a table variable from the proc, you can't do that. procs can data in 3 ways only:1. as results sets, as Peso has demonstrated2. as (scalar) output params3, as integer return codesEDIT: actually there are other ways procs can effectively return data. global temp tables for example, or permanent tables for that matter. it's questionable to call this "returning data" however. It's more of a side-effect. in any case this is worth a read: http://sommarskog.se/share_data.html elsasoft.org |
 |
|
|
|
|
|