Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I would like to join 2 table with range of time.
The problem is that the "where condition " is in 2 different tables, I tried also with while but doesn't work .
Hire attached the example
Many Thanks
Claudio
join(Detail)
load
Utente as DUser,
Data as DData2,
OraStart,OraEnd
RESIDENT Timbrature;
drop table Timbrature;
rename table Detail to Tmp;
Detail:
NoConcatenate
load *,
if (Time1>=OraStart and Time2<=OraEnd, '0', '1') as FlagOK
Resident Tmp;
DROP Table Tmp;
At first you have to join the tables then you can use the where condition on the fields:
Tab_tmp:
load * resident t1;
outer join
load * resident t2;
TAB:
noconcatenate
load * resident Tab_tmp where myCondition
drop table Tab_tmp;
Hope it helps
join(Detail)
load
Utente as DUser,
Data as DData2,
OraStart,OraEnd
RESIDENT Timbrature;
drop table Timbrature;
rename table Detail to Tmp;
Detail:
NoConcatenate
load *,
if (Time1>=OraStart and Time2<=OraEnd, '0', '1') as FlagOK
Resident Tmp;
DROP Table Tmp;
Many thanks
Work perfectly