Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have the following;
account from, account to, cost center from , costcenter to name
3000 3100 100 120 IS sales
3000 3100 100 130 BP sales
etc
Is it possible to create a intervall match with two intervalls ? I have seen the extended, but is not an interval
statement the last one ?
Is it possible to use apply map ?
Regards mikael
hi ,
From what i understood from your question is say u have data like
dat:
LOAD * INLINE [
accint,cosint
3075,125
3080,400
3090,170];
int:
LOAD * INLINE [
account from, account to, cost center from , costcenter to , name
3000,3100 ,100, 120,IS sales
3000,3100, 100,130,BP sales ];
now your reqired output based on the above data should be
accountfrom, accountto, costcenterfrom , costcenter to , name
3000 ,3100 , 100 ,130 , BP sales
If this is what u want then follow the below script
dat:
LOAD * INLINE [
accint,cosint
3075,125
3080,400
3090,170];
int:
LOAD * INLINE [
account from, account to, cost center from , costcenter to , name
3000,3100 ,100, 120,IS sales
3000,3100, 100,130,BP sales ];
accs:
join
IntervalMatch(accint)
load [account from], [account to] Resident int;
accs1:
join
IntervalMatch(cosint)
load [cost center from], [costcenter to] Resident int;
final:
load accint&cosint as key Resident dat ;
left join
load * , accint&cosint as key Resident int ;
drop table int,dat;
If u want to see some other output please let me know