I am trying to automatically create the SQL query for inserting data into
Oracle using SQL component. I have not found much documentation related to
this. Any ideas?
from("jms:queue:INPUT.Q")
.routeId("ens reports log route")
.convertBodyTo(String.class)
.process(new Processor() {
@Override
public void process(Exchange exchange) throws Exception
{
exchange.getIn().setBody("INSERT INTO Test
VALUES ('" +
exchange.getIn().getBody() + "')?dataSource=#dataSource");
}
})
.to("sql:?dataSource=#dataSource");
--
View this message in context:
http://camel.465427.n5.nabble.com/Dynamically-changing-SQL-with-INSERT-tp5784938.html
Sent from the Camel - Users mailing list archive at Nabble.com.