Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jZziy-00061b-I0 for pgsql-general@arkaria.postgresql.org; Sat, 16 May 2020 16:31:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jZzix-0007d7-Ec for pgsql-general@arkaria.postgresql.org; Sat, 16 May 2020 16:31:43 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jZzix-0007ZM-6Z for pgsql-general@lists.postgresql.org; Sat, 16 May 2020 16:31:43 +0000 Received: from smtp-zimbra.meteo.fr ([137.129.16.22] helo=celebrian2.meteo.fr) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jZzio-0001sE-Q8 for pgsql-general@lists.postgresql.org; Sat, 16 May 2020 16:31:41 +0000 Received: from localhost (localhost [127.0.0.1]) by celebrian2.meteo.fr (Postfix) with ESMTP id C7AEE16016B for ; Sat, 16 May 2020 18:31:31 +0200 (CEST) Received: from celebrian2.meteo.fr ([127.0.0.1]) by localhost (celebrian2.meteo.fr [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id R1SWU9hyv7Dr for ; Sat, 16 May 2020 18:31:31 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by celebrian2.meteo.fr (Postfix) with ESMTP id A9BB916016D for ; Sat, 16 May 2020 18:31:31 +0200 (CEST) X-Virus-Scanned: amavisd-new at celebrian2.meteo.fr Received: from celebrian2.meteo.fr ([127.0.0.1]) by localhost (celebrian2.meteo.fr [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 0uJe-ZgGs4sI for ; Sat, 16 May 2020 18:31:31 +0200 (CEST) Received: from zumba5.meteo.fr (zumba5 [172.31.9.201]) by celebrian2.meteo.fr (Postfix) with ESMTP id 88C1C16016B for ; Sat, 16 May 2020 18:31:31 +0200 (CEST) Date: Sat, 16 May 2020 18:31:30 +0200 (CEST) From: PALAYRET Jacques To: pgsql-general@lists.postgresql.org Message-ID: <786586020.3966730.1589646690749.JavaMail.zimbra@meteo.fr> Subject: Re: Removing Last field from CSV string MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="=_9efe9392-3bd6-4e60-be50-733d2d11a186" X-Originating-IP: [172.31.9.204] X-Mailer: Zimbra 8.7.11_GA_3822 (ZimbraWebClient - FF76 (Win)/8.7.11_GA_3822) Thread-Index: uh+muEkcDZ5Yx4NVjtDDGwd++7rYTA== Thread-Topic: Removing Last field from CSV string List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --=_9efe9392-3bd6-4e60-be50-733d2d11a186 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello,=20 Perhaps, a statement like :=20 substring(theString, 1, length(theString)-position(',' IN reverse(theString= )))=20 with theString 'Class V,Class VI,Class VII,Competitive Exam,Class VIII*,Cla= ss' for example.=20 Regards=20 ----- M=C3=A9t=C3=A9o-France -----=20 PALAYRET JACQUES=20 DCSC/MBD=20 jacques.palayret@meteo.fr=20 Fixe : +33 561078319=20 --=_9efe9392-3bd6-4e60-be50-733d2d11a186 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
Hello,

Perhaps, a statement like :
   substring(theString, 1, length(theString)-position(',' I= N reverse(theString)))

with theString   'Class V,Cl= ass VI,Class VII,Competitive Exam,Class VIII*,Class'  for example.
Regards
----- M=C3=A9t=C3=A9o-France -----
PALAYRET JA= CQUES
DCSC/MBD
jacques.palayret@meteo.fr
Fixe : +33 561078319
--=_9efe9392-3bd6-4e60-be50-733d2d11a186--