Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Crossing two table(resident) with where

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

1 Solution

Accepted Solutions
maxgro
MVP
MVP

  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;

View solution in original post

3 Replies
alexandros17
Partner - Champion III
Partner - Champion III

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

maxgro
MVP
MVP

  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;

Not applicable
Author

Many thanks

Work perfectly