Subject Re: [IBO] ISNUMERIC Function Supported for Interbase?
Author Helen Borrie
At 05:28 PM 29/07/2005 +0000, you wrote:
>I am attempting to use something similar to the ISNUMERIC function to
>determine the result set of an SQL Query but it tells me that the
>function is unknown in Interbase. Is there a similar function to do
>this? The sample code I am trying to recreate is basically like:
>
>select ROLLID,SKLOCATION from STOKFILE where ((SKLOCATION IS NULL) OR
>(SKLOCATION <> 'USFW')) AND (ISNUMERIC(SKLOCATION)<>1)
>union select ROLLID,RLLOCATION from rollfile where ((RLLOCATION IS
>NULL) OR (RLLOCATION <> 'USFW')) AND (ISNUMERIC(RLLOCATION)<>1) ORDER
>BY 1
>
>I need to show all rolls in non-numerical locations but LOCATION is a
>String field.

There is no ISNUMERIC() function in Firebird or InterBase. Did this
statement ever work? If so, perhaps you were using a UDF previously and
you haven't installed it in your current database.

I'd probably write a stored procedure to get this set. You can then parse
the contents of the SKLOCATION column inside a FOR...SELECT...INTO loop
using SUBSTRING() and the asciival() UDF and reject any rows where
SKLOCATION contains non-numeric characters.

Of course, any function or procedure doing this kind of test will only work
on a single-byte character set.

Helen