Checking for a number

From: Warren <warren(at)clarksnutrition(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Checking for a number
Date: 2007-06-27 17:30:43
Message-ID: 46829EC3.6090703@clarksnutrition.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I need to check if the last two characters of a field are a number. I am
trying something like this but it does not want to work.

substring(TRIM(field8) from '..$') SIMILAR TO '\d\d'

How should I do this?

--
Thanks,

Warren Bell

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Lee Keel 2007-06-27 17:39:39 Re: Checking for a number
Previous Message Matthew T. O'Connor 2007-06-27 16:50:42 Re: autovacumm not working ?