Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id B9B3E2E0043 for ; Tue, 20 Nov 2007 23:54:02 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 57041-08 for ; Tue, 20 Nov 2007 23:53:48 -0400 (AST) Received: from tomts16-srv.bellnexxia.net (tomts16.bellnexxia.net [209.226.175.4]) by postgresql.org (Postfix) with ESMTP id 7F2AC2E0037 for ; Tue, 20 Nov 2007 23:53:57 -0400 (AST) Received: from toip3.srvr.bell.ca ([209.226.175.86]) by tomts16-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20071121035355.ORFQ574.tomts16-srv.bellnexxia.net@toip3.srvr.bell.ca> for ; Tue, 20 Nov 2007 22:53:55 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Aq4HAB47Q0dBX6dI/2dsb2JhbACBWw Received: from bas3-london14-1096787784.dsl.bell.ca (HELO t60p.bax.ca) ([65.95.167.72]) by toip3.srvr.bell.ca with ESMTP; 20 Nov 2007 22:51:43 -0500 Message-ID: <4743ABD2.2010009@sympatico.ca> Date: Tue, 20 Nov 2007 22:53:54 -0500 From: Frank Bax User-Agent: Thunderbird 2.0.0.6 (X11/20070818) MIME-Version: 1.0 To: pgsql-php@postgresql.org Subject: Re: string function References: <014701c82c75$0d6fb6c0$0f0010b2@gunartha> In-Reply-To: <014701c82c75$0d6fb6c0$0f0010b2@gunartha> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200711/2 X-Sequence-Number: 3819 gunartha wrote: > select left(kd_aln,2) as code from airlin > > the error msg is : function left(character varying, integer) does not exist > For a complete list of string functions, look here: http://www.postgresql.org/docs/8.2/interactive/functions-string.html Perhaps you meant to use ... select substr(kd_aln,1,2) as code from airlin