Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys,
Could you please help me with one question. How to calculate max, min values in empty resident table or qvd file in the script. It's returns Min, Max value as empty value, but I would like to substitute these with '0' and to assign these to variables. Please see attached files. I know that is possible to calcualte count of records in that way as
LET a = NoOfRows('tab1').
Thanks for any help.
Try:
FactCollFull:
Load
Count(DW_LOAD_ID) as FactCollFullCount,
Min(DW_LOAD_ID) as Min_DW_LOAD_ID,
Max(DW_LOAD_ID) as Max_DW_LOAD_ID
FROM FACT_COLL_FULL.QVD(qvd);
Let v_TableName = 'FACT_COLL_FULL';
Let v_RecordCount = rangemax(0,peek('FactCollFullCount',0,FactCollFull));
Let v_MinDwLoadId = rangemin(0,peek('Min_DW_LOAD_ID',0,FactCollFull));
Let v_MaxDwLoadId = rangemax(0,peek('Max_DW_LOAD_ID',0,FactCollFull));
Try:
FactCollFull:
Load
Count(DW_LOAD_ID) as FactCollFullCount,
Min(DW_LOAD_ID) as Min_DW_LOAD_ID,
Max(DW_LOAD_ID) as Max_DW_LOAD_ID
FROM FACT_COLL_FULL.QVD(qvd);
Let v_TableName = 'FACT_COLL_FULL';
Let v_RecordCount = rangemax(0,peek('FactCollFullCount',0,FactCollFull));
Let v_MinDwLoadId = rangemin(0,peek('Min_DW_LOAD_ID',0,FactCollFull));
Let v_MaxDwLoadId = rangemax(0,peek('Max_DW_LOAD_ID',0,FactCollFull));
Thanks you very much , but in line Let v_MinDwLoadId = rangemin(0,peek('Min_DW_LOAD_ID',0,FactCollFull));
should be used rangemax, if table doesn't empty.