Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
Previously in my dashboard, I used the below script
Score:
SQL select s.simulation_id,
s.phase_id,
s.reviewee as user_id,
us.name,
s.sim_action_id,
sa.title as Action_name,
s.reviewer,
s.score_option_id,
so.value
from score s,score_option so,sim_action sa,user us where
s.score_option_id = so.score_option_id
and s.sim_action_id = sa.sim_action_id
and s.reviewee=us.user_id and s.score_option_id NOT IN (8,7);
But now based on requirement I just added another condition to my where clause in the above query, which looks like as below
select s.simulation_id,
s.phase_id,
s.reviewee as user_id,
us.name,
s.sim_action_id,
sa.title as Action_name,
s.reviewer,
s.score_option_id,
so.value
from score s,score_option so,sim_action sa,user us where
s.score_option_id = so.score_option_id
and s.sim_action_id = sa.sim_action_id
and s.reviewee=us.user_id and s.score_option_id NOT IN (8,7)
and s.reviewer <> 1;
and removed the first query, I reloaded the script but it is sill giving the same result as first one (including reviewer id = 1).
MySQL is returning the perfect data when I execute the query in MySQL.
Can someone explain why this is happening? What is the solution for this one.
Thanks
hi
are you sure there isn't other table you load the userid 1
if you load the query in a new model as a lone table , those it work properly?
I am not getting your point exactly.
But I figured it out, the problem is, if two tables have same column names, then qlikview is not concentrating on any conditions which I mentioned in where clause, it is just giving the same result for those 2 tables. Do you encounter any of these type of problems ?
Try with this from load statement
Load * from source
Where s.reviewer <> 1;
SQL
select s.simulation_id,
s.phase_id,
s.reviewee as user_id,
us.name,
s.sim_action_id,
sa.title as Action_name,
s.reviewer,
s.score_option_id,
so.value
from score s,score_option so,sim_action sa,user us where
s.score_option_id = so.score_option_id
and s.sim_action_id = sa.sim_action_id
and s.reviewee=us.user_id and s.score_option_id NOT IN (8,7);