SQL command text

  • Hi all,

    I have data flow task, which using OLE DB Source to get data, and then using Flat File Desination to save the data in a text file.

    the SQL command text is relatively longer (see attached), is there a way to get the SQL command text from a file, like 'Execute SQL Task' with SQLSourceType:File connection,

    or there are some other better ways to do it?

    Thanks in advance!

  • In my personal opinion, I don't find the SQL statement that long 🙂

    But if you really really want the SQL statement to originate from a file, you could read the file earlier in your control flow and store the text in a variable. Then use this variable in your OLE DB Source.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • Maybe you could just create a VIEW and use that as your source?

    The absence of evidence is not evidence of absence.
    Martin Rees

    You can lead a horse to water, but a pencil must be lead.
    Stan Laurel

  • Hi All,

    Thank you for all your help!

    VIEW is good solution for me.

    Thanks again.

Viewing 4 posts - 1 through 3 (of 3 total)

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