Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I m loading data from QVDs can anyone tell me how i can implement below SQL Query in QlikView Load statement using QVDs.
Select * from Table1, Table2 where Table1.field1 = Table2.field2 and Table1.datetime between (sysdate - 60) AND sysdate.
Ok.
In QlikView you can't load from more than one table at a time.
So you have to do it step by step, for example.
Result:
Load * from 1.qvd (qvd)
where datetime<Today() and datetime>Today()-60;
left join(Result)
Load * from 2.qvd (qvd)
where exists('field1', field2);
There are two tables in the query. Could you add some info what table you are trying to load and what is already loaded ?
I m willing to Load all fields from these two table.
i have tables like
Table1:
Field1 Field2 Field3 Field4
Table2:
Field2 Field5 Field6 Field7
and required out is
ResultantTable:
Field1 Field2 Field3 Field4 Field5 Field6 Field7
Ok.
In QlikView you can't load from more than one table at a time.
So you have to do it step by step, for example.
Result:
Load * from 1.qvd (qvd)
where datetime<Today() and datetime>Today()-60;
left join(Result)
Load * from 2.qvd (qvd)
where exists('field1', field2);
Another thing can you please tell me, is there any way to use subquery or any trick so that i can use subquries in LOAD statement.
Lets suppose my query is:
Select Field1, Field2, (Select Field3 From table2 t2 where t2.Field3 = t1.Field1) From Table1 t1
No, you have to do them step by step.
Athough, you can always use some tricks as 'distinct', exists() and 'keep' (look at help).
Also there is incremental LOAD (read it from bottom to top, the number of rows is the same):
[New Table]:
LOAD
Field1
Field2,
SomeFoo(Field3) as Field4
SomeOtherFoo(Field3) as Field5;
LOAD
Field1,
Field2,
Field3
Resident [SomeTable]
where [Some Complex condition];
cant understand what exactly you are telling in this example can you please give another example?
The above example is equivalent to these two loads:
[Temporary table]:
LOAD
Field1,
Field2,
Field3
Resident [SomeTable]
where [Some Complex condition];
[New Table]:
Noconcatenate
LOAD
Field1
Field2,
SomeFoo(Field3) as Field4
SomeOtherFoo(Field3) as Field5
Resident [Temporary table];
drop table [Temporary table];