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 <jamestay...@apache.org>
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 <anilgupt...@gmail.com> 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

Reply via email to