Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello, I have created interval match on a single tab.
it looks like this:
DistanceTable:
LOAD * INLINE [
Start, Stop, Distance
0, "499,99", 0-500
500, "999,99", 500-1000
1000, "1499,99", 100-1500
1500, "1999,99", 1500-2000
2000, "2499,99", 2000-2500
2500, "2999,99", 2500-3000
3000, "3499,99", 3000-3500
3500, "3999,99", 3500-4000
4000, "4499,99", 4000-4500
4500, "4999,99", 4500-5000
5000, "5499,99", 5000-5500
5500, "5999,99", 5500-6000
6000, "6499,99", 6000-6500
6500, "6999,99", 6500-7000
7000, "7499,99", 7000-7500
7500, "7999,99", 7500-8000
8000, "8499,99", 8000-8500
8500, "8999,99", 8500-9000
9000, "9499,99", 9000-9500
9500, "9999,99", 9500-10000
10000, "10499,99", 10000-10500
10500, "10999,99", 10500-11000
11000, "11499,99", 11000-11500
11500, "11999,99", 11500-12000
12000, , 12000+
];
Left Join(DistanceTable)
IntervalMatch(Vzdialenost)
Load
Start,
Stop
Resident
DistanceTable;
Drop Fields Start, Stop from DistanceTable;
it makes me another table but I want to put it in main table as a new row as a renamed row..it it possible?
The intervalmatch creates a table that contains one record per combination of Distance (Vzdialenost) and Distance_Interval. You choose to join this onto the table that contains distance intervals. But you can just as well join it onto the table that contains Vzdialenost. Then I think you get what you want.
Just be aware that one distance (in principle) can belong to several intervals, so if you have overlapping intervals you will get record duplication.
HIC
I don't know if I have asked the right way,but I want the result of the interval match(for me is it Distance) give to the main table I have. So can I join the main table tha the row Vzdialenosti is replaced with Distance? main table:
DataLety:
first 100
LOAD
ID_Letu,
ID_LeteckaSpolocnost,
LeteckaSpolocnost,
ID_TypLeteckejSpolocnosti,
TypLeteckejSpolocnosti,
ID_Region,
ID_LetiskoOdlet,
ID_LetiskoPrilet,
ID_Lietadlo,
TypLetu,
PlanovanyPocetOdletov,
SkutocnyPocetOdletov,
UzitocneZatazenie,
Vzdialenost,
KapacitaLietadla,
PocetPasazierov,
PrepravenyNaklad,
TrvanieLetu,
CasVoVzduchu,
// Obdobie as Date,
Month(Obdobie) as Month,
Year(Obdobie) as Year,
ID_Obdobie
Hi
The interval match should be left joined to Table DataLety. Then the interval match will add the Start and Stop fields to your data table. This will result in a synthetic key which you can remove (although you don't really need to) by adding:
Left Join (DataLety)
LOAD * Resident DistanceTable; // this will add Distance to the data table
DROP Field Start, Stop; // unless you want to keep these
DROP Table DistanceTable;
HTH
Jonathan
This should I add to to interval match that I have down like I have now join left(DistanceTable)?? because I did it like you told me and I don't have the row distance in table
Left Join (DataLety)
IntervalMatch(Vzdialenost)
Load
Start,
Stop
Resident DistanceTable;
these I have get these..no Distance row