Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> How do I test if a value is numeric?
I have a Char(30) field in a database that has been used to store a
variable length persons name and optionally a 2 decimal number (e.g. 12.34,
and 2.34). The number is always preceded by at least one space.
I need records where there is a number on the end. How do I write a clause to do this?
I have clause that converts the last six characters to a numeric value (used in Select clause):
CAST(SUBSTRING(CB_TR_NARRATIVE FROM POSITION (' ' IN CB_TR_NARRATIVE FROM 24) AS NUMERIX(4,2)) AS Actual
but for the case where a number is not included, this fails.
Thanks for any help you can offer,
-- Graeme Richardson Analyst Programmer AdeptX LimitedReceived on Tue Dec 17 2002 - 20:28:16 CST