« Return to Thread: Oracle query

Re: Oracle query

by sanjeev40084 :: Rate this Message:

Reply to Author | View in Thread

Brian, i did not check the log..but even in iBatis

when i change the query with the hard code value .e.g. '2008' after removing to_num function from the query, i get the result back. So i don't think it's access issue.

Sanjeev


Brian Elcock wrote:
Hello Sanjeev

Are you sure that the user that the IBatis application is using has
access to that function? Are you logging the statement to see what is
actually being sent to the database?

Brian

On Thu, Aug 20, 2009 at 12:08 PM, sanjeev40084<sanjeev40084@hotmail.com> wrote:
>
> I have query something like this:
>
> Select t1.col1, t2.col2,
> From table1 t1
> Inner join table2 t2 ON t1.id = t2.id
> Where to_num(t1.col3) = 2008 <--this will be dynamic in iBatis
>
> I tried this code using Oracle Sql Developer and it works fine.
> Now same code when i try in Ibatis
>
> I have query something like this:
>
> Select t1.col1, t2.col2,
> From table1 t1
> Inner join table2 t2 ON t1.id = t2.id
> Where to_num(t1.col3) = #Year#        <--Year is a property whose datatype
> is int
>
> Ibatis keeps on complaining about 'to_num' function:
> [System.Data.OracleClient.OracleException] = {"ORA-00904: \"TO_NUM\":
> invalid identifier\n"}
>
> Any suggestions?
>
>
>
>
>
>
>
>
> --
> View this message in context: http://www.nabble.com/Oracle-query-tp25068034p25068034.html
> Sent from the iBATIS - User - Cs mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-cs-unsubscribe@ibatis.apache.org
> For additional commands, e-mail: user-cs-help@ibatis.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-cs-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-cs-help@ibatis.apache.org

 « Return to Thread: Oracle query