filtering "distinct" values count from the output

This forum contains ProfileStage posts and now focuses at newer versions Infosphere Information Analyzer.

Moderators: chulett, rschirm

Post Reply
Maximus_Jack
Premium Member
Premium Member
Posts: 139
Joined: Fri Apr 11, 2008 1:02 pm

filtering "distinct" values count from the output

Post by Maximus_Jack »

Hi
the below rule

col0="orange"
and col1="apple"
and col2 ="fruits"

output
====
shopname, col0, col1, col2
xxxx,orange, apple, fruits
xxxx,orange, apple, fruits
yyyy,orange, apple, fruits
yyyy,orange, apple, fruits
yyyy,orange, apple, fruits

produces a list of all the records matches the condition, but the output result contains a lot of duplicates on a particular column ( for example column name "shopname" ), if i want to produce a row count of only the unique records from column "shopname" satisfying the above rule,
anyway to do that in IA

select count(distinct shopname)
from table1
where col0="orange"
and col1="apple"
and col3="fruits"

cheers
Mj
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Wouldn't think so - it's not really a rule, is it? You have EXISTS and you have EXISTS n, which are rules, but how does your count fit in to a data rule?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
stuartjvnorton
Participant
Posts: 527
Joined: Thu Apr 19, 2007 1:25 am
Location: Melbourne

Post by stuartjvnorton »

Have you tried Exclude Duplicate Records (or whatever it's called on the output tab)? Make the output only return the shopname and see if it works.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Stuart, it seemed to me that counts were required. Otherwise your approach is valid.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
stuartjvnorton
Participant
Posts: 527
Joined: Thu Apr 19, 2007 1:25 am
Location: Melbourne

Post by stuartjvnorton »

Yeah, I thought maybe the Exclude Duplicates would show in the pass/fail.

Of course if he's using 9.1 he could use Exclude Duplicates, then cascade the results to another rule that always succeeds. The Pass value of that rule should be the number.

Getting a bit ridiculous though.
Post Reply