Solved

OUTPUT table Valued Parameter in SQL server Stored Procedure

Posted on 2011-02-14
2
709 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
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

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

Data architecture is an important aspect in Software as a Service (SaaS) delivery model. This article is a study on the database of a single-tenant application that could be extended to support multiple tenants. The application is web-based develope…
Hi all, It is important and often overlooked to understand “Database properties”. Often we see questions about "log files" or "where is the database" and one of the easiest ways to get general information about your database is to use “Database p…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

760 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now