Using variables in sql statements
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Kurt_Hayes
Posted On:   Tuesday, September 17, 2002 12:36 PM

I'm trying to pass variable parameters to a task that runs sql statements. Can anyone tell me how to make this work? The following code does not work correctly. If my sql statement is "select * from dual", everything works fine. Thanks! driver='oracle.jdbc.driver.OracleDriver' print='true' url="jdbc:oracle:thin:@${machine}:1521:orcl" userid='${user_pw}' password='${user_pw}' rdbms='oracle'> select * from "${table_name}";    More>>

I'm trying to pass variable parameters to a task that runs sql statements.



Can anyone tell me how to make this work? The following code does not work correctly. If my sql statement is "select * from dual", everything works fine.

Thanks!



			













driver='oracle.jdbc.driver.OracleDriver'
print='true'
url="jdbc:oracle:thin:@${machine}:1521:orcl"
userid='${user_pw}'
password='${user_pw}'
rdbms='oracle'>

select * from "${table_name}";



   <<Less

Re: Using variables in sql statements

Posted By:   Erik_Hatcher  
Posted On:   Wednesday, September 18, 2002 03:18 AM

The task does not do property expansion on the text inside the tags. You will have to come up with another mechanism for parameterizing your commands, perhaps with a tokenized file using a filtered ?
About | Sitemap | Contact