phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Prasad Reddy (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (PHOENIX-4157) I am currently facing issue namedparameters from Java
Date Mon, 04 Sep 2017 01:42:00 GMT

     [ https://issues.apache.org/jira/browse/PHOENIX-4157?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Prasad Reddy updated PHOENIX-4157:
----------------------------------
    Description: 
uncategorized SQLException for SQL [select * from orders where customer like 'customer%' and
user like ?]; SQL state [00000]; error code [-1]; Error -1 (00000) : while preparing SQL:
select * from orders where customer like 'customer%' and user like ?; nested exception is
org.apache.calcite.avatica.AvaticaSqlException:

This happening when I below query with named parameter
searchOrderQuery = new StringBuilder("select * from customer where customer like :customerName");

and if I replace name parameter then it is working fine 
searchOrderQuery = new StringBuilder("select * from customer where customer like '%rajesh%'
 ");

**Note:It is happening only for like statement and not for others

  was:
uncategorized SQLException for SQL [select * from orders where customer like 'customer%' and
user like ?]; SQL state [00000]; error code [-1]; Error -1 (00000) : while preparing SQL:
select * from orders where customer like 'customer%' and user like ?; nested exception is
org.apache.calcite.avatica.AvaticaSqlException:

This happening when I below query with named parameter
searchOrderQuery = new StringBuilder("select * from customer where customer like :customerName");

and if I replace name parameter then it is working fine 
searchOrderQuery = new StringBuilder("select * from customer where customer like '%rajesh%'
 ");


> I am currently facing issue namedparameters from Java
> -----------------------------------------------------
>
>                 Key: PHOENIX-4157
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-4157
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: Prasad Reddy
>
> uncategorized SQLException for SQL [select * from orders where customer like 'customer%'
and user like ?]; SQL state [00000]; error code [-1]; Error -1 (00000) : while preparing SQL:
select * from orders where customer like 'customer%' and user like ?; nested exception is
org.apache.calcite.avatica.AvaticaSqlException:
> This happening when I below query with named parameter
> searchOrderQuery = new StringBuilder("select * from customer where customer like :customerName");
> and if I replace name parameter then it is working fine 
> searchOrderQuery = new StringBuilder("select * from customer where customer like '%rajesh%'
 ");
> **Note:It is happening only for like statement and not for others



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message