Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Please give me some input on these :
I have a table 1 (fields : start_time) and table 2 (fields : start_time, end_time)
i wanted to join them like this :
SQL statement :
select *
from table1 a
join table2 b
on a.start_time<= b.start_time AND b.start_time <= a.end_time
qlikview statement :
?
Thanks,
qualify *;
a:
load start_time,
x,
y,
z;
sql select * from a;
join
qualify *;
b:
load start_time,
end_time,
d,
e;
SQL Select *
from b;
new:
load * from a
where a.start_time<= b.start_time AND b.start_time <= a.end_time;
hope it helps
a:
load
rowno() as key,
start_time as start_time_a,
end_time as end_time_a;
sql select * from table a;
b:
join(a)
load
rowno() as key
start_time as start_time_b
end_time as end_time_b
sql select * from table b;
load *
resident a
where start_time_a <= start_time_b and start_time_b <= end_time_a
Hi,
You can use intervalmatch. See: http://community.qlik.com/blogs/qlikviewdesignblog/2013/04/04/intervalmatch
Regards,
David
try the below one...
table1:
LOAD a_starttime,a_endtime,'a' as dummy;
SQL SELECT * FROM table1
join table
table2
LOAD b_starttime,b_endtime,'a' as dummy;
SQL SELECT * FROM table2
table3:
load *
resident table1 where a_starttime<= b_starttime AND b_starttime <= a_endtime
drop tables table1