COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: fchickering on 04 Jan 2011 09:13:03 AM

Title: Filter - numeric and string?
Post by: fchickering on 04 Jan 2011 09:13:03 AM
I have a column of accounting codes (acct_code) that have numeric AND string values.  Can I create 1 filter that will select both?

Example:
7201
7216
721P
721Q
7300
7389

I want my syntax to be....((acct_code>=7200 and acct_code<=7400) or (acct_code =721P or acct_code=721Q)).  THis syntax does not work.....I must be missing some key part, or else perhaps it is not possible?
Thanks in advance.
Title: Re: Filter - numeric and string?
Post by: sir_jeroen on 04 Jan 2011 09:24:22 AM
change filter to ....((acct_code>='7200' and acct_code<='7400') or (acct_code ='721P' or acct_code='721Q')).  So add quotes!