Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Translate the SQL statement in to Qlikview expression

Currently im trying to code a expression but I only know how to query it in SQl statement

SQL:

select * from Orders o where o.product_name != MBProductName AND o.transaction_id in ( select m.transaction_id from marketBasket m where m.product_name = MBProductName);

I want to put the results into a chart of table form.

TableForm : enter image description hereAnd it will do this query when I select the MBProductName.

can anyone help me translate? Thanks in advance

Extra information : The following picture is my Schema for my database enter image description here

3 Replies
sujeetsingh
Master III
Master III

Use nested if to handle this kind of conditional expressions

Not applicable
Author

Hi, can you teach me how to query it? As im new to qlikview.. thanks in advance

Not applicable
Author

Depends on what these fields represent and the relation you expect.

Assuming that MBProduct is the same as Product in facts table, you would want an "AND Mode" scenario.  To do so, you would need to remove the MBProductGroup as And Mode only takes one table.