Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
mtabernad
Partner - Creator
Partner - Creator

Got stuck with IntervalMatch

Hi community,

I have two tables. In table 1 there is a field called "NumericIPOrigen", and I want to get its "Codigo de oficina" from Table 2 when "NumericIPOrigen" is between its corresponding "NumericIP_Max" and "NumericIPMin".

 

capture25.pngcapture26.png

It has to be pretty simple but I am not able to achieve it. I would really appreciate any help.

Thank you in advance.

My script is as follows:

Amenazas:
NoConcatenate
Load
*,subfield("IP Destino",'.',1) << 24 + subfield("IP Destino",'.',2) << 16 +
subfield("IP Destino",'.',3) << 8 + subfield("IP Destino",'.',4) << 0 as NumericIp

Resident Amenazas_aux
where %Fecha<=Today();

drop Table Amenazas_aux;

OficinaPorIP:
LOAD
"Código de oficina",
NumericIp_Min,
NumericIp_Max
FROM [lib://Security_Analytics_Folder_Agbar/2.QVD/Layer2/MapeoRangosIP.QVD]
(qvd);


Left join (Amenazas)
IntervalMatch(NumericIp)
Load
NumericIp_Min,
NumericIp_Max
Resident OficinaPorIP;

drop Table OficinaPorIP;

 

 

Labels (2)
1 Solution

Accepted Solutions
petter
Partner - Champion III
Partner - Champion III

You should't drop the table OficinaPorIP. 

View solution in original post

3 Replies
petter
Partner - Champion III
Partner - Champion III

Could you please share some test data ... a small extract from each table that you made a screenshot of ?

petter
Partner - Champion III
Partner - Champion III

You should't drop the table OficinaPorIP. 

mtabernad
Partner - Creator
Partner - Creator
Author

You're right! Thank you!