i have written a oracle query in Script Task and assigned it to string variable. This is my query
string oracle_query = "SELECT bank_ID, Branch_ID, Trans_NUM, Trans_DT, convert(Varchar(25),quantity) AS quantity FROM OPENQUERY(orcale_server_name, 'SELECT * "
+ "FROM oracletable" +
" where bank_ID =''" + Dts.Variables["User::bank_ID"].Value.ToString() + "'' AND Trans_DT = ''" + Dts.Variables["User::Trans_DT"].Value.ToString() + "'' AND quantity = " + Dts.Variables["User::quantity"].Value.ToString() + " AND Branch_ID = ''" + Dts.Variables["User::Branch_ID"].Value.ToString() + "'' ')";
the result of this query has been assigned to string variabl which i have declared in my package
Dts.Variables["oraclequery"].Value = oracle_query; .
output of this query is
bank_ID Branch_ID Trans_Num Trans_DT Quantity
12 13 12AS566 2012-01-01 4000
Based on Trans_Num column i need to update one more table.
Instead of script task i can use oledb TranFormation, but while passing Running parameters in Oledb Source, no data is coming.
So the result of script task i have assigned to OracleQuery varibale and passed as source variable in Execute Sql Task and resultset as Full Result Set .
This Execute SQl Task resultset i have passed to for each loop container and inside varibale index i have assigned OracleQuery Varibale.
but still no data is populating