Is it possible to get dynamic query in variable link to oledb source sql command with variable?

  • Guys,

    Am in need to get dynamic run-time query from a sql table according to its unique_id, that query should be passed to oledb source through variable.

    I got the run-time query into the variable, but the problem is, i cant able to map the variable to oledb source, it throws exact error. Only at run-time the variable gets filled with the query value, but before itself i need to map it to the source then only i can transmit to .txt file using flat file destination.

    Did anyone come across this issue, if so pls suggest some idea:blush::blink:

  • How is this topic different from this one:

    http://www.sqlservercentral.com/Forums/Topic1138118-148-1.aspx

    Don't use the OLE DB source. Use string variables and the Execute SQL Task.

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

  • Yes. This topic is different from previous post. Upto execute sql task, I've done, variable got filled, now need to transfer the query in variable to oracle then to .txt

    Sql table column contains sql_"query" column name, it has oracle query for each row, now i need to get the oracle query according to unique_id, then pass to the source.

  • So it sounds like you have a table with a bunch of SQL commands stored in a column that you need to read from the table, modify in real time, run on an oracle machine then store them to a text file?

    It sounds like you might be able to do that in a dataflow with a script component in the dataflow. I'm not familiar with oracle but if you can connect to it through odbc you can use .net code in a script component to connect to it and run each command.

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

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