Subject | RE: [firebird-support] CHECK for all numeric characters |
---|---|
Author | Rick Debay |
Post date | 2005-09-02T14:32:54Z |
> Have you considered declaring the column as numeric (11,0)?Yes. The Medispan database defines the field as X(11) which is eleven
characters, but the data stored is a UPC, NDC, or HRI which are all
digits only.
I decided against it because another field (Generic Product ID) was
defined as X(14) and for the last few decades contained only digits.
Recently it was announced that the ID would now contain letters also,
which has required a lot of changes. If I had defined it to match their
picture and added a CHECK for the digit constraint, I could have removed
the CHECK on the domain and it would have only taken a minute.
Rick DeBay
-----Original Message-----
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of David Johnson
Sent: Thursday, September 01, 2005 3:00 PM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] CHECK for all numeric characters
On Thu, 2005-09-01 at 12:19 -0400, Rick Debay wrote:
> I'm creating a domain that's CHAR(11) and I'd like to add a check to
> make sure all the characters are numeric. I'm experiencing a brain
> freeze right now and can't come up with one. Can anyone suggest the
> appropriate CHECK statement(s)?
>
> Thanks, Rick DeBay
Have you considered declaring the column as numeric (11,0)?
------------------------ Yahoo! Groups Sponsor --------------------~-->
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/67folB/TM
--------------------------------------------------------------------~->
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Visit http://firebird.sourceforge.net and click the Resources item on
the main (top) menu. Try Knowledgebase and FAQ links !
Also search the knowledgebases at http://www.ibphoenix.com
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Yahoo! Groups Links