You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by Thomas Elavarasu <no...@gmail.com> on 2014/08/26 13:32:33 UTC

Query is not working via camel-jdbc component.

Hi,

I am using camel 2.13.0 and try to run this query via Spring DSL. its not
working while comparing two tables with same field. for example ID field is
available in both tables , 

Query :
select * from table1 a, table2 b where a.ID = b.ID;

Am getting following exception :

com.microsoft.sqlserver.jdbc.SQLServerException: The value is not set for
the parameter number 1.
        at
com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:190)
        at
com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.buildParamTypeDefinitions(SQLServerPreparedStatement.java:260)
        at
com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.buildPreparedStrings(SQLServerPreparedStatement.java:219)
        at
com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doPrepExec(SQLServerPreparedStatement.java:612)
        at
com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:400)

But instead of above query, if i use below query it is working.

select * from table1 a, table2 b where XX = YY;

XX >> field in table1, YY >> field in table2

My question is how to compare two different tables with common field ?

Thanks
Thomas



--
View this message in context: http://camel.465427.n5.nabble.com/Query-is-not-working-via-camel-jdbc-component-tp5755692.html
Sent from the Camel Development mailing list archive at Nabble.com.

Re: Query is not working via camel-jdbc component.

Posted by Christian Müller <ch...@gmail.com>.
Please use the user mailing list.
And try whether it's working with plain JDBC. I don't think it's an Camel
issue.

Best,
Christian
Am 26.08.2014 13:57 schrieb "Thomas Elavarasu" <no...@gmail.com>:

> Hi,
>
> I am using camel 2.13.0 and try to run this query via Spring DSL. its not
> working while comparing two tables with same field. for example ID field is
> available in both tables ,
>
> Query :
> select * from table1 a, table2 b where a.ID = b.ID;
>
> Am getting following exception :
>
> com.microsoft.sqlserver.jdbc.SQLServerException: The value is not set for
> the parameter number 1.
>         at
>
> com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:190)
>         at
>
> com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.buildParamTypeDefinitions(SQLServerPreparedStatement.java:260)
>         at
>
> com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.buildPreparedStrings(SQLServerPreparedStatement.java:219)
>         at
>
> com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doPrepExec(SQLServerPreparedStatement.java:612)
>         at
>
> com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:400)
>
> But instead of above query, if i use below query it is working.
>
> select * from table1 a, table2 b where XX = YY;
>
> XX >> field in table1, YY >> field in table2
>
> My question is how to compare two different tables with common field ?
>
> Thanks
> Thomas
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Query-is-not-working-via-camel-jdbc-component-tp5755692.html
> Sent from the Camel Development mailing list archive at Nabble.com.
>