From: Ting Chang Date: 2008-05-30T08:09:55+09:00 Subject: How do i replace actual value in the query with variables? I try to set up a loop to put the data in the array into the oracle data base by iteration. Thus I put the variable into the sql query. I know this is no correct for dynamic querying, Can you give me some advise about how to do dynamic querying in ruby and oracle? Here is my wrong example. I hope this help you understand my question. I really appreciate your help..Thank you so much!! ---------------------------------------------------------------------------------------------------- for q in 0..4 s = Float(q) conn.exec( 'UPDATE SCH_EVENT SET P_ID = 2444334 where RANK= s AND playlist_id=432') end ------------------------------------------------------------------------------------------------------ Best Regards, Erick -- Posted via http://www.ruby-forum.com/.