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: 
farolito20
Contributor III
Contributor III

if load

I have a table with a column call MostRecent, and I have two types of load:

if exist a row with MostRecent=1, I need this load

LOAD

  t_bpid,

  t_nama,

  t_ccur,

  ValidFrom,

  ValidTill,

  Checksum,

  MostRecent

  Resident DimOld

  Where exists (Checksum2, Checksum) and t_bpid = $(vCustomerNumber) and MostRecent=1;

but, if not exist a row with MostRecent=1, i need just one row with MostRecent=0 and execute this load.

LOAD

                    t_bpid,

                     t_nama,

                     t_ccur,

                    date(now()) as ValidFrom,

                    Timestamp#('31-12-2099 08:00:00','DD-MM-YYYY hh:mm:ss')          as ValidTill,

                    Checksum,

                    1 as MostRecent

          Resident DimOld

          Where exists (Checksum2, Checksum) and t_bpid = $(vCustomerNumber) and MostRecent=0;

I cannot execute both at the same time

0 Replies