Wednesday, March 28, 2012

Saving Query Result to new file

Hi Gurus,

Can u help me out in the following two scenario/problems.

1. I want to save the query results (which is generated within execute sql task) to file (which does not exists & should be created at run time). is it possible?

2. Can I define the file name, in Flat File connection Manager, dynamically (by using some variable)?

Your support and help will be appreciated...

regards,

Anas

Zadoras wrote:

Hi Gurus,

Can u help me out in the following two scenario/problems.

1. I want to save the query results (which is generated within execute sql task) to file (which does not exists & should be created at run time). is it possible?

It is, in theory, possible yes. But you will need more tasks to be able to do it. If I were you I would just use a data-flow (which would contain a Flat File Connection Manager).

Zadoras wrote:

2. Can I define the file name, in Flat File connection Manager, dynamically (by using some variable)?

Yes. Look to use an expression:

Setting expressions
http://blogs.conchango.com/jamiethomson/archive/2006/03/11/3063.aspx)

-Jamie

|||

For your first question it sounds to me like you really need is a DataFlow task...any problem with that?

Rafael Salas

|||

How will i able to create file? I know I can do it using data flow task but my question is that HOW WILL I BE ABLE TO CREATE FILE (not just insert data) using FLAT FILE CONNECTION manager?

is it possible

how can i able to format the data?

|||

Not really sure what the problem is here. The file gets created as soon as you flow data into it using the Flat File Destination Adapter.

-Jamie

|||

If NO file is there I get this error message:

TITLE: Package Validation Error

Package Validation Error


ADDITIONAL INFORMATION:

Error at Send Mail Task [Send Mail Task]: Either the file "\\dwdev\d$\DW Load Reports\Comany.xls" does not exist or you do not have permissions to access the file.

Error at Send Mail Task: There were errors during task validation.

(Microsoft.DataTransformationServices.VsIntegration)


BUTTONS:

OK

if I creat file manually... this error goes

Can any also tell me format the data in XLS file (as query result output). It is showing me all data in merely 1 column? though, I have data (from query result) in 7 column

regards,
Anas

|||

I have got the asnwer.....

It is not the problem of Falt File Destination (Data Flow).... I am also using Send Mail Task to send file as an attachment... so i must have attachement file....

got it now.... sorry to bother u. and waisting your times...

thanx for you support

cheers,

sql

No comments:

Post a Comment