Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

OUTPUT table Valued Parameter in SQL server Stored Procedure

Posted on 2011-02-14
2
Medium Priority
?
716 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 800 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 800 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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

There have been several questions about Large Transaction Log Files in SQL Server 2008, and how to get rid of them when disk space has become critical. This article will explain how to disable full recovery and implement simple recovery that carries…
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
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…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

722 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