Solved

OUTPUT table Valued Parameter in SQL server Stored Procedure

Posted on 2011-02-14
2
715 Views
Last Modified: 2012-05-11
HI,
  My client has Requirements that i have to create Stored Procedure  which will return table ,but he need such kind of thing that so returned table can be stored in external table variable.
how i can use Table variable in output parameter then just returning simple result set.
I have to write some Dynamic Query so i can not use Function.
0
Comment
Question by:Theone84
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 19

Assisted Solution

by:Bhavesh Shah
Bhavesh Shah earned 200 total points
ID: 34886780
Hi,

Its quite not possible to achieve what client says.
check out the link for same
http://odetocode.com/code/365.aspx

What you can use do is, you can use Global Temporary Tables(##).



- Bhavesh
0
 
LVL 50

Accepted Solution

by:
Lowfatspread earned 200 total points
ID: 34886836
table parameters can only be uses as INPUT to a stored procedure...

it is not possible to use on for OUTPUT...

so you are left with  using either True temporary tables (local # or global ##) (or an actual table)

or XML
0

Featured Post

Veeam gives away 10 full conference passes

Veeam is a VMworld 2017 US & Europe Platinum Sponsor. Enter the raffle to get the full conference pass. Pass includes the admission to all general and breakout sessions, VMware Hands-On Labs, Solutions Exchange, exclusive giveaways and the great VMworld Customer Appreciation Part

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

630 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question