Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
we are using the sql querry to fetch the data..
it s like
load
table1:
col1,
col2,......;
sql select
col........
from(
(select
col.......
from( table1,table2,...........,
where condn.....
) union
(select
col.......
from( table1,...........,
where condn.....
)
) table-a,
(select
col.......
from( table1,...........,
where condn.....
) table-b,
(select
col.......
from( table1,...........,
where condn.....
) table-c,
where condn..... ;
how to optimize this code to make it efficient
I would give it a try and load the tables separately from SQL-server and then combined them in QV.
Peter
I would give it a try and load the tables separately from SQL-server and then combined them in QV.
Peter
i didi it seperately. but the record count gets varied.
in sql , the condition is like this
where
table2.clounmA (+) = table1.columnA
in my qlikview code , is the following expression is correct?
table1:
load
columnA...
from..... ;
left keep(table1)
table2:
load
columnA...
from..... ;
If I get your code right, then you actually load 2 tables with different conditions (WHERE-clauses) and to glue them together into one table. In this case you should use the JOIN-operator.
LEFT KEEP creates a new table having only those keyfields, which are existing in the other table (typically used for description like customer-code, customer-name, customer-address etc).
Thus your syntax should read
Table1: LOAD ColumnA, .... FROM ....;
JOIN LOAD ColumnA, .... FROM ....;
Doing so you should have just one table, having all records from table1 and from table2.
HTH
Peter