You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by dpravin <pr...@gmail.com> on 2016/10/13 04:13:40 UTC
Camel SQL
Hi,
I am trying to invoke a select count(*) from table1 or select count(pk_id)
from table1. I am using SQL and do get the result in the body in following
format,
[{COUNT(*)=10}] or [{COUNT(PK_ID)=10}]. I would like to use the response to
do some conditional routing. How do I get the result from the body and use
it as following for conditional routing,
count(*)>=1
Thanks,
P
--
View this message in context: http://camel.465427.n5.nabble.com/Camel-SQL-tp5788710.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Camel SQL
Posted by fabryprog <fa...@bizmate.it>.
If you execute your query using alias (count(*) as c) you can use simple EL.
http://camel.apache.org/simple.html
The query result is into body input message
For example: *${body[c]}*. It is a list of hashmap object.
--
View this message in context: http://camel.465427.n5.nabble.com/Camel-SQL-tp5788710p5788711.html
Sent from the Camel - Users mailing list archive at Nabble.com.