Headers are already interpolated like :#headerName. I've never tried using
expressions in SQL like that.

On 15 December 2015 at 13:44, Shiv <shiv.dixit....@gmail.com> wrote:

> Hi,
> I want to insert a record in table using camel sql component and want to
> externalize the insert query in a properties file. Seems it is not working
> fine as simple expression in properties is not getting replaced by actual
> value.
>
> #Insert query in properties file - this is not working
> SQLInsertQuery=insert into Message (messageId, messageBody)
> values('$simple{in.header.JMSMessageID}', '$simple{in.body}')
>
> #Insert query in properties file - this is also not working
> SQLInsertQuery=insert into Message (messageId, messageBody)
> values('${in.header.JMSMessageID}', '${in.body}')
>
> #Insert query in properties file - this is also not working
> SQLInsertQuery=insert into Message (messageId, messageBody)
> values(:#${header.JMSMessageID}, :#${body}')
>
>
> My route calls below but insert is failing in call cases.
> <to uri="sql:{{SQLInsertQuery}}"/>
>
> Am I missing anything in expression?
>
> Thanks for input.
> Shiv
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Using-Message-Headers-Body-into-Camel-SQL-Insert-statement-tp5775107.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Matt Sicker <boa...@gmail.com>

Reply via email to