String Manipulation

From: Christine Penner <christine(at)ingenioussoftware(dot)com>
To: Postgres-General <pgsql-general(at)postgresql(dot)org>
Subject: String Manipulation
Date: 2009-06-12 19:36:27
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general


I want to calculate a new field I added to a table but I'm not sure
how to do it. This will be a copy of another field with any non
numeric characters stripped off the end and padded with spaces.

This is what I was trying to do

Update Buildings SET B_LOT_SORT=lpad(substr(lot,1,??),7)

instead of ?? I need to know the position of the last numeric character.
Any suggestions would be appreciated

Christine Penner
Ingenious Software


Browse pgsql-general by date

  From Date Subject
Next Message Harald Fuchs 2009-06-12 20:14:21 Re: WITH RECURSIVE clause -- all full and partial paths
Previous Message Sam Mason 2009-06-12 18:38:44 Re: search for partial dates