Thread: parse error ???

parse error ???

From
greg@proterians.net
Date:
   I have one question...

  Why postgres returns parse error when i send

  select birth_time::date from table;


  parse error at or near ":"


  I use CBuilder4 and postODBC driver...


  when I write

  select date(birth_time) from table;

  it works...


  but in DataBaseExplorer the first query works fine....


  please help....


   --Greg--



Re: [GENERAL] parse error ???

From
Date:
cast is not necessarily extract, if you really want portablility,
use extract(), which is sql92.

select extract (day from d1) from datetime_tbl;

On Thu, 9 Dec 1999 greg@proterians.net wrote:

>
>    I have one question...
>
>   Why postgres returns parse error when i send
>
>   select birth_time::date from table;
>
>
>   parse error at or near ":"
>
>
>   I use CBuilder4 and postODBC driver...
>
>
>   when I write
>
>   select date(birth_time) from table;
>
>   it works...
>
>
>   but in DataBaseExplorer the first query works fine....
>
>
>   please help....
>
>
>    --Greg--
>
>
>
> ************
>