Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I try to export data to a flat file from OLE DB source. Here is what I do under OLE DB source editor. In SQL command Text:

declare @t 
   table (customerid varchar(100),[enrollment_Date] varchar(100))
insert into @t exec master.dbo.my_stored_procedure
select * from @t

In the preview, I can see data but when I execute it, I get empty text file. Do you know why?

share|improve this question
    
Do you have your flat file destination configured correctly? If the problem isn't with the query itself, I'd say it's part of the Data Flow. –  Thomas Stringer May 29 '12 at 0:43
add comment

1 Answer

up vote 1 down vote accepted

use SET NOCOUNT ON

SET NOCOUNT ON
declare @t 
   table (customerid varchar(100),[enrollment_Date] varchar(100))
insert into @t exec master.dbo.my_stored_procedure
select * from @t

http://www.bidn.com/blogs/dustinryan/ssis/835/ssis-ole-db-source-using-table-variables-returns-no-rows

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.