Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How Can I make this LOAD
LOAD
MostRecent
Resident DimOld
Where exists (Checksum2, Checksum) and t_bpid = $(vCustomerNumber);
IF MostRecent=1 then
LOAD
t_bpid,
t_nama,
t_ccur,
ValidFrom,
ValidTill,
Checksum,
MostRecent
Resident DimOld;
ELSEIF m=0 then
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,
//date(now()) as ValidTill,
Checksum,
1 as MostRecent
Resident DimOld;
ENDIF
I need to use the MostRecent value, and then compare if is 1 or 0
let rows = NoofRows(TableName);
How load just the last row?
add this field to your table:
Table:
Load *,
RowNo() as RowNumber
from whereever;
let rows= noofrows(Table);
Load *
resident table
where RowNo = $(rows);
In the last where, missing () in RowNo?
Load *
resident table
where RowNumber = $(rows);
I have an error
let rows= noofrows(Table);
What's the value of 'rows' variable??
The variable don't save anything.
I can solve my problem to first 1 load and put order by ValidTill desc and this show me the last row
let rows= noofrows('Table'); // may be you need to use simple quotes ...