Also, Ahmed can you tell us the Phoenix version you are using? On Wed, Nov 19, 2014 at 3:30 PM, Eli Levine <[email protected]> wrote:
> Maryann, is the JOIN statement Ahmed is running supposed to work? > > Thanks, > > Eli > > > On Wed, Nov 19, 2014 at 1:16 PM, Ahmed Hussien <[email protected]> > wrote: > > > Yes, > > but it didn't work also!!! > > > > > > On 20 نوف, 2014 ص 12:13, Chris Tarnas wrote: > > > >> I haven't tested it to verify, but you are missing a double quote at the > >> end of History in the nested query's from. > >> > >> > >> -chris > >> > >> > >> On Nov 19, 2014, at 1:11 PM, Ahmed Hussien <[email protected]> > wrote: > >>> > >>> The same problem!! > >>> > >>> On 19 نوف, 2014 م 06:55, Eli Levine wrote: > >>> > >>>> Try without the outermost parenthesis like this: select > >>>> "Records"."Operation", "Records"."status", "Records"."timestamp" from > >>>> "History" where "Records"."timestamp"=(SELECT > MAX("Records"."timestamp") > >>>> FROM "History where "rowId" like 'xyz'); > >>>> > >>>> Eli > >>>> > >>>> On Wed, Nov 19, 2014 at 1:29 AM, Ahmed Hussien <[email protected]> > >>>> wrote: > >>>> > >>>> for the following query: > >>>>> > >>>>> select "Records"."Operation", "Records"."status", > "Records"."timestamp" > >>>>> from "History" where ("Records"."timestamp"=(SELECT > >>>>> MAX("Records"."timestamp") FROM "History where "rowId" like 'xyz')); > >>>>> > >>>>> > >>>>> > >>>>> I got this Error: > >>>>> > >>>>> > >>>>> org.apache.phoenix.exception.PhoenixParserException: ERROR 602 > >>>>> (42P00): > >>>>> Syntax error. Missing "LPAREN" at line 1, column 95. > >>>>> at org.apache.phoenix.exception.PhoenixParserException. > >>>>> newException( > >>>>> PhoenixParserException.java:33) > >>>>> at org.apache.phoenix.parse.SQLParser.parseStatement( > >>>>> SQLParser.java:111) > >>>>> at org.apache.phoenix.jdbc.PhoenixStatement$ > >>>>> PhoenixStatementParser. > >>>>> parseStatement(PhoenixStatement.java:775) > >>>>> at org.apache.phoenix.jdbc.PhoenixStatement.parseStatement( > >>>>> PhoenixStatement.java:856) > >>>>> at org.apache.phoenix.jdbc.PhoenixPreparedStatement.<init>( > >>>>> PhoenixPreparedStatement.java:91) > >>>>> at org.apache.phoenix.jdbc.PhoenixConnection.prepareStatement( > >>>>> PhoenixConnection.java:506) > >>>>> at uaCore.DBQuerys.chkClDel(DBQuerys.java:143) > >>>>> at uaCore.DBQuerys.ScUpsert(DBQuerys.java:56) > >>>>> at uaCore.ReadInsertDelete.insDel(ReadInsertDelete.java:41) > >>>>> at uaCore.operate.main(operate.java:6) > >>>>> Caused by: MissingTokenException(inserted [@-1,0:0='<missing > >>>>> LPAREN>',<77>,1:94] at "Records") > >>>>> at org.apache.phoenix.parse.PhoenixSQLParser. > >>>>> recoverFromMismatchedToken(PhoenixSQLParser.java:299) > >>>>> at org.antlr.runtime.BaseRecognizer.match( > >>>>> BaseRecognizer.java:115) > >>>>> at org.apache.phoenix.parse.PhoenixSQLParser.not_ > >>>>> expression(PhoenixSQLParser.java:5509) > >>>>> at org.apache.phoenix.parse.PhoenixSQLParser.and_ > >>>>> expression(PhoenixSQLParser.java:5329) > >>>>> at org.apache.phoenix.parse.PhoenixSQLParser.or_ > >>>>> expression(PhoenixSQLParser.java:5266) > >>>>> at org.apache.phoenix.parse.PhoenixSQLParser.expression( > >>>>> PhoenixSQLParser.java:5231) > >>>>> at org.apache.phoenix.parse.PhoenixSQLParser.not_ > >>>>> expression(PhoenixSQLParser.java:5511) > >>>>> at org.apache.phoenix.parse.PhoenixSQLParser.and_ > >>>>> expression(PhoenixSQLParser.java:5329) > >>>>> at org.apache.phoenix.parse.PhoenixSQLParser.or_ > >>>>> expression(PhoenixSQLParser.java:5266) > >>>>> at org.apache.phoenix.parse.PhoenixSQLParser.expression( > >>>>> PhoenixSQLParser.java:5231) > >>>>> at org.apache.phoenix.parse.PhoenixSQLParser.select_node( > >>>>> PhoenixSQLParser.java:3543) > >>>>> at org.apache.phoenix.parse.PhoenixSQLParser.hinted_ > >>>>> select_node(PhoenixSQLParser.java:3685) > >>>>> at org.apache.phoenix.parse.PhoenixSQLParser.oneStatement( > >>>>> PhoenixSQLParser.java:537) > >>>>> at org.apache.phoenix.parse.PhoenixSQLParser.statement( > >>>>> PhoenixSQLParser.java:443) > >>>>> at org.apache.phoenix.parse.SQLParser.parseStatement( > >>>>> SQLParser.java:108) > >>>>> ... 8 more > >>>>> > >>>>> > > >
