Received: from mail.socotec.fr (mail.socotec.fr [195.154.104.66]) by hub.org (8.10.1/8.10.1) with ESMTP id e6ABK8W69461 for ; Mon, 10 Jul 2000 07:20:08 -0400 (EDT) Received: from socotec.fr (172.16.110.12 [172.16.110.12]) by mail.socotec.fr with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.1960.3) id NJB3ADA8; Mon, 10 Jul 2000 13:21:52 +0200 Message-ID: <3969C13F.68F1506E@socotec.fr> Date: Mon, 10 Jul 2000 13:27:43 +0100 From: NRonayette X-Mailer: Mozilla 4.7 [fr] (WinNT; I) X-Accept-Language: en,fr-FR MIME-Version: 1.0 To: Travis Bauer CC: pgsql-general@postgresql.org Subject: Re: SQL question References: Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Archive-Number: 200007/343 Travis Bauer a écrit : > > Is it possible to return a column in an sql statement which concantenates > two other columns and adds some other characters. For example: > > create table t1 (x int, y int); > insert into t1 values(1,2); > select ???? as nifty from t1; > > nifty > ----- > 1/2 > > What should I put in for the ???? ? select t1.x||'/'||t1.y from t1; this should work. If you can't concatenate int with char (t1.x with '/'), you must use a function to convert int in char If "to_char" is the name of this function, ???? became : to_char(t1.x)||'/'||to_char(t1.y) Nicolas