dbTalk Databases Forums  

Export based on a sp

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Export based on a sp in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Ed
 
Posts: n/a

Default Export based on a sp - 01-27-2005 , 01:05 PM






Hi,
I have a stored procedure that generates a table variable. How am I able
to export the result of that table variable to an excel file. I don't see
any function in Transformation Task that allows to run any stored procedure.
All I can choose from Transformation Task is a table or a view.
Thanks
Ed


Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Export based on a sp - 01-27-2005 , 02:47 PM






Can you not change this to a table valued function and do

SELECT <col list> FROM dbo.FuncName(Params)



--



Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.SQLIS.com - You thought DTS was good. here we show you the new stuff.
www.konesans.com - Consultancy from the people who know


"Ed" <Ed (AT) discussions (DOT) microsoft.com> wrote

Quote:
Hi,
I have a stored procedure that generates a table variable. How am I able
to export the result of that table variable to an excel file. I don't see
any function in Transformation Task that allows to run any stored
procedure.
All I can choose from Transformation Task is a table or a view.
Thanks
Ed




Reply With Quote
  #3  
Old   
Ed
 
Posts: n/a

Default Re: Export based on a sp - 01-27-2005 , 02:59 PM



Yes, it works fine by using table valued function
I would like to make sure I could not use table variable or temp table to
export out to text or Excel file by using Transformation Task, is that true?
Thanks Allan
Ed

"Allan Mitchell" wrote:

Quote:
Can you not change this to a table valued function and do

SELECT <col list> FROM dbo.FuncName(Params)



--



Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.SQLIS.com - You thought DTS was good. here we show you the new stuff.
www.konesans.com - Consultancy from the people who know


"Ed" <Ed (AT) discussions (DOT) microsoft.com> wrote in message
news:890CD6A1-2BDE-4351-B9EB-4D074A641EA1 (AT) microsoft (DOT) com...
Hi,
I have a stored procedure that generates a table variable. How am I able
to export the result of that table variable to an excel file. I don't see
any function in Transformation Task that allows to run any stored
procedure.
All I can choose from Transformation Task is a table or a view.
Thanks
Ed





Reply With Quote
  #4  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Export based on a sp - 01-27-2005 , 03:12 PM



If I was doing this in an SP I would

SET NOCOUNT ON

And do a SELECT at the end.

Temp tables are a pain and ++ you incur recreate costs and maybe even plan
recompilations as well.



--



Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.SQLIS.com - You thought DTS was good. here we show you the new stuff.
www.konesans.com - Consultancy from the people who know


"Ed" <Ed (AT) discussions (DOT) microsoft.com> wrote

Quote:
Yes, it works fine by using table valued function
I would like to make sure I could not use table variable or temp table to
export out to text or Excel file by using Transformation Task, is that
true?
Thanks Allan
Ed

"Allan Mitchell" wrote:

Can you not change this to a table valued function and do

SELECT <col list> FROM dbo.FuncName(Params)



--



Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.SQLIS.com - You thought DTS was good. here we show you the new
stuff.
www.konesans.com - Consultancy from the people who know


"Ed" <Ed (AT) discussions (DOT) microsoft.com> wrote in message
news:890CD6A1-2BDE-4351-B9EB-4D074A641EA1 (AT) microsoft (DOT) com...
Hi,
I have a stored procedure that generates a table variable. How am I
able
to export the result of that table variable to an excel file. I don't
see
any function in Transformation Task that allows to run any stored
procedure.
All I can choose from Transformation Task is a table or a view.
Thanks
Ed







Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.