Received: from news.tht.net (news.hub.org [216.126.91.242]) by postgresql.org (8.11.3/8.11.4) with ESMTP id f9FE5Gr11596 for ; Mon, 15 Oct 2001 10:05:16 -0400 (EDT) (envelope-from news@news.tht.net) Received: (from news@localhost) by news.tht.net (8.11.4/8.11.4) id f9FE03k64640 for pgsql-sql@postgresql.org; Mon, 15 Oct 2001 10:00:03 -0400 (EDT) (envelope-from news) From: Szabo Zoltan X-Newsgroups: comp.databases.postgresql.sql Subject: Re: to_char()?? Date: Mon, 15 Oct 2001 16:05:16 +0200 Organization: Hub.Org Networking Services (http://www.hub.org) Lines: 32 Message-ID: <3BCAED1C.3090306@mportal.hu> References: <9qb2lj$13lv$1@news.tht.net> <9qd0j0$1gc3$1@news.tht.net> <9qdfnh$1jte$1@news.tht.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed X-Complaints-To: scrappy@hub.org User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.5) Gecko/20011011 X-Accept-Language: en-us To: pgsql-sql@postgresql.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by postgresql.org id f9FE8ZK12520 X-Archive-Number: 200110/212 X-Sequence-Number: 5167 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" ¼¶¼g©ó¶l¥ó·s»D > :9qd0j0$1gc3$1@news.tht.net... > >>>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? >> >> > >