Dynamic FIle pickup while EMAIL in SSIS

  • Dear friends,

    I have a ETL job that generate a text file ( with timestamp. ABCfile041208.txt).

    and I would like to create a send email task to send this file as an attachement.

    How can I do this? the file name is going to change everyday..

    Can you show me some example?

    I appreciate your help.

    Thanks

  • Assign the file name to a variable and use the variable in setting up the email attachment.



    Alvin Ramard
    Memphis PASS Chapter[/url]

    All my SSC forum answers come with a money back guarantee. If you didn't like the answer then I'll gladly refund what you paid for it.

    For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • Alvin,

    I appreciate your reply. Thank you. I planned to do that. I am using expression to create my filename with hhmm.txt. Can you explain me in detail how to assign to a variable.

    Thanks

  • If you're using an expression for creating the file name, try using the same expression for the attachment.



    Alvin Ramard
    Memphis PASS Chapter[/url]

    All my SSC forum answers come with a money back guarantee. If you didn't like the answer then I'll gladly refund what you paid for it.

    For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • Alvin,

    My concern is if my dataflowtask executed at 11 hour and 07 mins (11:07) i.e., at filename200908301107.txt and jumped onto email part at 1108. Email expression will try to look for 11 hours and 08 mins file i.e., 200908301108.txt and cannot be found right? Because the file we geerated is 200908301107.txt.

    Sorry If I am confusing you.

    Thanks

  • you only need to use the expression part once. create a variable - call it something like outputfile - which you can evaluate as an expression. then use that variable for your data flow task output, and also use the variable as your attachment on your mail.

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply