Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 298
  • Last Modified:

FTP

Hi,

I have query in sql gives me xml result
So I need to use that result query by  FTP Task in SSIS

Thanks
0
samprg
Asked:
samprg
  • 2
1 Solution
 
Christopher GordonSenior Developer AnalystCommented:
Are you looking to export the contents of an XML result of a stored proc into a file that you can then use by the FTP task in SSIS?  If so...

Normally, I'll use bcp to handle this in a "process task" in  SSIS.  You can create a batch file that calls the BCP command and refer to that .bat in your "process task".

The .bat file would look something like this...

bcp "select * FROM YourDatabase.YourSchema.YourObject FOR XML RAW" queryout c:\OutputMyData.xml -S MyServerName -T -w -r -t

Note: XML RAW is just an example, you can use whatever options you'd need based on the requirements.



0
 
samprgAuthor Commented:
I wanna use task in SSIS like T-sql to create an XML file,
but How I can save queryout in xml file to use it in FTP task?
0
 
Christopher GordonSenior Developer AnalystCommented:
hi samprg,

I've used the "Process Task" to execute BCP in a .bat file in order to create the XML Output file.  There may be a task that allows you to export the stored procedure to xml file in a data flow task, but I've never used it.  

As a second step, I use the "FTP task" to use the file created in the previous "Process Task" step to FTP the XML Output file to an FTP destination.

Sorry if this wasn't what you were looking for!  I'll be offline until l8r this evening.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now