Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 496F7476504 for ; Mon, 9 Sep 2002 11:25:20 -0400 (EDT) Received: from anchor-post-31.mail.demon.net (anchor-post-31.mail.demon.net [194.217.242.89]) by postgresql.org (Postfix) with ESMTP id A58284767C8 for ; Mon, 9 Sep 2002 11:00:05 -0400 (EDT) Received: from mwynhau.demon.co.uk ([193.237.186.96] helo=mainbox.archonet.com) by anchor-post-31.mail.demon.net with esmtp (Exim 3.35 #1) id 17oQ17-000KPh-0V; Mon, 09 Sep 2002 15:59:57 +0100 Received: from client.archonet.com (unknown [192.168.1.16]) by mainbox.archonet.com (Postfix) with ESMTP id E0488163D6; Mon, 9 Sep 2002 15:51:18 +0100 (BST) Content-Type: text/plain; charset="iso-8859-1" From: Richard Huxton Organization: Archonet Ltd To: "Linn Kubler" , pgsql-sql@postgresql.org Subject: Re: Character translation? Date: Mon, 9 Sep 2002 15:50:07 +0100 User-Agent: KMail/1.4.1 References: In-Reply-To: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200209091550.07630.dev@archonet.com> X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200209/48 X-Sequence-Number: 9325 On Thursday 05 Sep 2002 11:15 pm, Linn Kubler wrote: > Hi, > > I have a view like this: > create view myview as > select recid, title, firstname || chr(32) || lastname as expert, rank > from mytable; > > When I use this view via odbc on a Windows 2000 system using Visual FoxPro > the expert field shows up as a memo field. This is analogous to the text > field in PSQL. > What I'd like to do is have the expert column come through as a varchar > type so that it shows up as a text field in VFP. Any suggestions? > I was looking at the functions and didn't see anything that would do the > trick for me but I could have just missed something. I also saw a > reference to the cast() function but couldn't find any usage info on it in > the online docs. I think you're on the right track, try something like: select (firstname || ' ' || lastname)::varchar as expert ... If it works, could you let the list know in case anyone else needs this in= =20 future. If not, there is an ODBC list too (see postgresql.org website for= =20 details) - Richard Huxton