Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I have a query-select distinct col1,col2... From table 1 ,table 2 where....
..
so I have implemented the whole logoc except the distinct.
if I ll check my model by not including distinct.its fine.
but the business requirement is to have distinct.
can u guys please help.
I really stucked.
thanks in advance
Not clear what exactly is wrong if you use distinct. Need some more info...
Qlikview will automatically group your data based on how you build your data model. So the DISTINCT logic is being built in without actually using DISTINCT. However, everything depends on how your data model is setup DISTINCT can be useful to help limit your data set in certain cases.
so where do I apply the distinct in script,
I am a novice in qlikview modelling.
is it in load distinct * resident table_name; ???
but this way I get zero records.
You missed the point. If Qlikview automatically groups your data based on how your data model is built, it's already applying distinct.
However, if you are attempting to limit your data set in the load. Then distinct is a predicate used if only the first of duplicate records should be loaded Typically
You'll have
LOAD COUNT(DISTINCT Field1) AS Field1Count ,
Field1,
Field2,
You can also apply DISTINCT as a keyword right after LOAD
LOAD DISTINCT
field1,
field2
field2
...
-Rob