Solved

OUTPUT table Valued Parameter in SQL server Stored Procedure

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

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to keep a record with the highest value 3 58
Many to one in one row 2 48
SQL syntax question 6 73
get count of orders by customer Sql Server table. 3 48
Naughty Me. While I was changing the database name from DB1 to DB_PROD1 (yep it's not real database name ^v^), I changed the database name and notified my application fellows that I did it. They turn on the application, and everything is working. A …
Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

734 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