Hi
What does the iBatis statement log say? You shuold see the exact sql
statements that iBatis is executing.
try use $YEAR$ (instead of #YEAR#) which means a literal substitution,
and, if no other paramters is given, a non prepared statement would be used.
AndreaT
Brian Elcock wrote:
t1.col3 is a valid column?
You get a complaint about the to_num function still when you remove it
from the query? Your original error was:
[System.Data.OracleClient.OracleException] = {"ORA-00904:
\"TO_NUM\":invalid identifier\n"}
I don't see how you could get the same error if to_num is no longer
sent to the DB.
Brian
On Thu, Aug 20, 2009 at 1:06 PM, sanjeev40084<sanjeev40...@hotmail.com> wrote:
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<sanjeev40...@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-unsubscr...@ibatis.apache.org
For additional commands, e-mail: user-cs-h...@ibatis.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-cs-unsubscr...@ibatis.apache.org
For additional commands, e-mail: user-cs-h...@ibatis.apache.org
--
View this message in context:
http://www.nabble.com/Oracle-query-tp25068034p25068971.html
Sent from the iBATIS - User - Cs mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-cs-unsubscr...@ibatis.apache.org
For additional commands, e-mail: user-cs-h...@ibatis.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-cs-unsubscr...@ibatis.apache.org
For additional commands, e-mail: user-cs-h...@ibatis.apache.org
--
AndreaT
---------------------------------------------------------------------
To unsubscribe, e-mail: user-cs-unsubscr...@ibatis.apache.org
For additional commands, e-mail: user-cs-h...@ibatis.apache.org