Discussion Board for collaboration on QlikView Scripting.
I have simple table:
My task is to write SQL select query, which must get me rows, for which quantity of worked conditions=2
and only those records, for which quantity of worked below conditions=2:
In result i need get only first 2 records:
May be this? I am not sure why you want Field3 - 12 in the result, Because we are filtering the only 444 from that table?
Load Field1, Field2, Field3, Field4 Where Field1 > Field2 and Field3 = 444 and Field4 > 32;
LOAD * Inline [
Field1, Field2, Field3, Field4
12, 0, 12, 54
23, 7, 444, 32
43, 55, 5, 6445
12, 435, 43534, 4
122, 2, 444, 35
But it must be not scripting code from QV. I need SQL query.
Query must check each records and quantity conditions for each of them which are working.
If quantity of working conditions for some record =2, it must be shown in result table.
Please give proper name for your field then it will help us to give reply.
I am sorry, We are in Qlik Forum. Move to DB Forum
FYI, This should work in SQL Engine
SELECT Field1, Field2, Field3, Field4 From TableName Where Field1 > Field2 and Field3 = 444 and Field4 > 32;
For this you can simply write
where Field1 in (12,23);