dbTalk Databases Forums  

Data Pump Task with stored proc won't work

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


Discuss Data Pump Task with stored proc won't work in the microsoft.public.sqlserver.dts forum.



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

Default Data Pump Task with stored proc won't work - 06-24-2004 , 06:50 AM






I have built a stored procedure that returns a result set I want to
use in DTS to populate a table, but on the Transformations tab I see
no Source columns?

The procedure uses data from several tables to populate a temp table,
which is then joined to other tables. Nothing very fancy...

On the source tab, I simply put:
"exec my_proc"

On the Destination tab I chose a Destination table, I go to the
Transformations tab, I have no source columns to choose from.

I know the procedure is OK; it runs in Query Analyzer and with the
Preview button on the Source tab I see my result set.

What could be wrong?

Thanx in advance,

Bart

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

Default Re: Data Pump Task with stored proc won't work - 06-24-2004 , 07:47 AM






Make sure the first thing in the proc is

SET NOCOUNT ON

Let us know if this works

--
--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


"pipo" <pipo1 (AT) ilse (DOT) nl> wrote

Quote:
I have built a stored procedure that returns a result set I want to
use in DTS to populate a table, but on the Transformations tab I see
no Source columns?

The procedure uses data from several tables to populate a temp table,
which is then joined to other tables. Nothing very fancy...

On the source tab, I simply put:
"exec my_proc"

On the Destination tab I chose a Destination table, I go to the
Transformations tab, I have no source columns to choose from.

I know the procedure is OK; it runs in Query Analyzer and with the
Preview button on the Source tab I see my result set.

What could be wrong?

Thanx in advance,

Bart



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

Default Re: Data Pump Task with stored proc won't work - 07-06-2004 , 06:29 AM



Thanx for your reply.
The nocount was on already.

But I figured it out: the proc put data in a temp table, to get it out
later.
For performance reasons, DTS surrounds the SQL with

SET FMTONLY ON
EXEC my_proc
SET FMTONLY OFF

And if the procedure runs with FMTONLY ON, then there's no temp table
to do a select on...

Regards,
Bart


"Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote

Quote:
Make sure the first thing in the proc is

SET NOCOUNT ON

Let us know if this works

--
--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


"pipo" <pipo1 (AT) ilse (DOT) nl> wrote in message
news:5bb747d0.0406240350.44b6856a (AT) posting (DOT) google.com...
I have built a stored procedure that returns a result set I want to
use in DTS to populate a table, but on the Transformations tab I see
no Source columns?

The procedure uses data from several tables to populate a temp table,
which is then joined to other tables. Nothing very fancy...

On the source tab, I simply put:
"exec my_proc"

On the Destination tab I chose a Destination table, I go to the
Transformations tab, I have no source columns to choose from.

I know the procedure is OK; it runs in Query Analyzer and with the
Preview button on the Source tab I see my result set.

What could be wrong?

Thanx in advance,

Bart

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.