Re: to_char()??

From: Szabo Zoltan <col(at)mportal(dot)hu>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: to_char()??
Date: 2001-10-15 14:05:16
Message-ID: 3BCAED1C.3090306@mportal.hu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Try: ::text

CoL

guard wrote:

> thanks
>
> I have run "select substr('hi there', 3, 5)::varchar(5) as xx;"
> but get error message
> Error: ERROR: parser: parse error at or near ":"
>
> --
>
> "Lee Harr" <missive(at)frontiernet(dot)net> ¼¶¼g©ó¶l¥ó·s»D
> :9qd0j0$1gc3$1(at)news(dot)tht(dot)net(dot)(dot)(dot)
>
>>>how to
>>>select substr('hi there',3,5) as xx -->> xx change char type
>>>
>>>
>>How about:
>>
>>select substr('hi there', 3, 5)::varchar(5) as xx;
>>
>>or is this not what you mean?
>>
>>
>
>

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2001-10-15 15:12:36 Re: Why would this slow the query down so much?
Previous Message guard 2001-10-15 01:56:26 Re: to_char()??