Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cognos extract number from char field

Status
Not open for further replies.

schurers

Programmer
Jul 29, 2009
8
0
0
US
Does the function isnumeric exist in Cognos? I have a field of credit scores that are stored in the warehouse as charlength(16). There are all kinds of text within that field including spaces, dashes, symbol, and numbers but I need to able to filter for credit scores less than 700. Is this possible in Cognos without having to do the work in ETL ? Thanks in advance....
Ex: 'Unknown'
'No# / 632'
'677'
 
I was able to find that Cognos does have isnumeric
I created dataitem1 ISNUMBERIC([Credit Check Score])
I created a second dataitem to cast dateitem1 as a number

CASE WHEN
[dateitem1] = 1
then
cast([Credit Check Score],float)
else
0
END

I added a filter to find any records with a credit score less than 610

[dateitem2] between 1 and 609


This post can be closed.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top