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 |
|
pflarini
Starting Member
3 Posts |
Posted - 2008-11-05 : 12:11:37
|
| Hi, in some parts of my application I call a stored procedure and this procedure insert rows in a temporary table, then I read this temp table from dephi to display or use the result.I need to know if there is a way to select directly from the stored procedure, like : select * from my_procedure(param1, param2)...thanks, |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-11-05 : 12:15:02
|
| you need to use OPENROWSET for that. see belowhttp://sqlblogcasts.com/blogs/madhivanan/archive/2007/11/26/select-columns-from-exec-procedure-name-is-this-possible.aspx |
 |
|
|
Transact Charlie
Master Smack Fu Yak Hacker
3451 Posts |
Posted - 2008-11-05 : 12:15:16
|
| You might be wanting a table valued function instead. Have a look in books on line.Charlie===============================================================Msg 3903, Level 16, State 1, Line 1736The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION |
 |
|
|
pflarini
Starting Member
3 Posts |
Posted - 2008-11-05 : 12:29:26
|
| I need something like oracle´s pipelined functionsI don´t make a select in my stored proc, but I return row by row:http://www.oracle-developer.net/display.php?id=207 |
 |
|
|
pflarini
Starting Member
3 Posts |
Posted - 2008-11-05 : 12:33:29
|
| This tabled valued function seams to be the way. |
 |
|
|
Transact Charlie
Master Smack Fu Yak Hacker
3451 Posts |
Posted - 2008-11-06 : 04:20:51
|
| Just bear in mind that a function cannot modify actual data in any way. (you can't use temp tables inside, though you can use table variables).Charlie===============================================================Msg 3903, Level 16, State 1, Line 1736The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION |
 |
|
|
|
|
|
|
|