Hi James,
I am using Phoenix3.0 along with HBase0.94.15. Do you mean to say that this
query should work even if dummy_date is unsigned_date?
select * from events where dummy_date=TO_DATE('2012-12-23', 'yyyy-MM-dd')
and id='1234' limit 50;
I tried this query and i didn't get correct results. I have data in the
table where dummy_date = 2012-12-23.
~Anil
On Wed, Jul 9, 2014 at 12:13 PM, James Taylor <[email protected]>
wrote:
> Not sure, as it looks correct. What version of Phoenix are you using? FWIW,
> that query should work w/out the cast too.
>
> Thanks,
> James
>
> On Wednesday, July 9, 2014, anil gupta <[email protected]> wrote:
>
> > Hi James,
> > I tried following query:
> > select * from events where dummy_date=CAST(TO_DATE('2012-12-23',
> > 'yyyy-MM-dd') AS UNSIGNED_DATE) and id='1234' limit 50;
> >
> > But, i get following error:
> > Error: ERROR 602 (42P00): Syntax error. Missing "LPAREN" at line 1,
> column
> > 30. (state=42P00,code=602)
> >
> > Can you tell me whats wrong here?
> >
> > Thanks,
> > Anil Gupta
> >
> >
> > On Wed, Jul 9, 2014 at 11:48 AM, James Taylor <[email protected]
> > <javascript:;>>
> > wrote:
> >
> > > Hi Anil,
> > >
> > > Try using CAST to explicitly cast the result to an unsigned date, like
> > > this: CAST(TO_DATE(someDate) AS UNSIGNED_DATE)
> > >
> > > Thanks,
> > > James
> > >
> > > On Wed, Jul 9, 2014 at 8:38 PM, anil gupta <[email protected]
> > <javascript:;>> wrote:
> > > > Hi All,
> > > >
> > > > Phoenix has a DataType Unsigned_Date but now i am unable to use these
> > > > columns for filtering. For using a date column in sql query i can use
> > > > to_date(). I think similarly we need to have to_unsigned_date
> > function. I
> > > > can file a jira for this. Can anyone guide me how to introduce this
> > > > function in sql language of Phoenix.
> > > >
> > > > --
> > > > Thanks & Regards,
> > > > Anil Gupta
> > >
> >
> >
> >
> > --
> > Thanks & Regards,
> > Anil Gupta
> >
>
--
Thanks & Regards,
Anil Gupta