You may get solutions from others, that depend on using a function that a database vendor supports. Be that an 'IsNumeric' type of function or a data type conversion function which can return a specific value when a conversion would fail.
There isn't a generic built in function in CA at this time, but you can use the built in regex capability.
For example, where a definition of a number might be is optional leading sign, followed by one or more digits.
case when occurrences_regex ( '[+-]?[0-9]+\b' , [REGEX].[CASE].[C1] ) > 0 then 'looks like a number' else 'has some non-numeric stuff in it' end
------------------------------
NIGEL CAMPBELL
------------------------------
Original Message:
Sent: Fri January 13, 2023 10:11 AM
From: Anthony Wilson
Subject: Have To Start Somewhere! Testing A String To Determine If Numeric
Hello all,
Very noob-sauce IBM Cognos report developer (< 30 day) here just trying to learn some of the basics.
My task today is to determine if a string data type field contains all numeric data as a criteria for including/excluding a row with that data element in the report. Looking thru the functions available to me in 11.1 I do not see anything like an isNumeric or really anything like that. Would love some advice. Thank you!
Please let me know if I should direct these questions to other forums / other sites. Thank you all for any assistance, guidance!
------------------------------
Anthony Wilson
------------------------------