[ http://issues.apache.org/jira/browse/DERBY-582?page=all ] Mamta A. Satoor closed DERBY-582: ---------------------------------
> Dynamic parameter should be allowed to be the operand of unary operator "-". > Derby throws exception 42X36: The '-' operator is not allowed to take a ? > parameter as an operand." > -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- > > Key: DERBY-582 > URL: http://issues.apache.org/jira/browse/DERBY-582 > Project: Derby > Type: Bug > Components: JDBC > Versions: 10.2.0.0 > Reporter: Mamta A. Satoor > Assignee: Mamta A. Satoor > Fix For: 10.2.0.0 > Attachments: Derby582UnaryDynamic092605.txt, > Derby582UnaryMinusDynamic104005.txt, Derby582UnaryParameter101105.txt > > A simple test program which uses dynamic parameter for unary operator "-" > fails with an exception. Following is the snippet of the code > ps = con.prepareStatement("select * from t1 where c11 = -?"); > ps.setInt(1,1); > rs = ps.executeQuery(); > The prepareStatement call fails with following exception > SQLSTATE(42X36):ERROR 42X36: The '-' operator is not allowed to take a ? > parameter as an operand. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
