camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jamie3 <jam...@gmail.com>
Subject Dynamically changing SQL with INSERT
Date Thu, 07 Jul 2016 15:21:45 GMT
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.

Mime
View raw message