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" <[EMAIL PROTECTED]> ¼¶¼g©ó¶l¥ó·s»D
> :9qd0j0$1gc3$[EMAIL PROTECTED]
> 
>>>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?
>>
>>
> 
> 


---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html

Reply via email to