Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Is it poosible to obrain the count of distinct values in a given field
for a given table and use that value for specifying limite in FOR Loop
in load script.
If the field exists in only that one table then you can use fieldvaluecount:
LET vMyFieldCount = fieldvaluecount('FieldNameHere');
Otherwise you'll have to calculate the count first:
Temp:
load count(distinct FieldNameHere) as MyFieldCount resident MyTableHere;
LET vMyFieldCount = peek('MyFieldCount');
drop table Temp;
If the field exists in only that one table then you can use fieldvaluecount:
LET vMyFieldCount = fieldvaluecount('FieldNameHere');
Otherwise you'll have to calculate the count first:
Temp:
load count(distinct FieldNameHere) as MyFieldCount resident MyTableHere;
LET vMyFieldCount = peek('MyFieldCount');
drop table Temp;