Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Everyone,
I was wondering what a good way would be to tell if a table that is loaded in has no data. To clarify, I am using script like:
Table1:
NOCONCATENATE LOAD *
Resident Data
where A = 1 and B like '$(vName)';
Now it may be that the part "B like '$(vName)'" might not pull anything in because it does not match any values. This would make the table blank with no data inside (like if you went to table viewer and cannot preview data because nothing is there).
If that is the case, I want to Concatenate onto it with something that does have data like:
Concatenate(Table1)
Load *
Resident Data
where A =1 and B like 'HardCodedValue';
But I don't want it where I concatenate the table with this new data if there is already something there. So I'm wondering if there is any good way to say "If the Table1 has no data, then concatenate"?
Thanks!
You can use the system function to retrieve the number of rows of your resident table (I think it's called NoOfRows(TableName), but check the HELP). Use the result of the system function in a control flow using IF .. THEN .. ELSE.
You can use the system function to retrieve the number of rows of your resident table (I think it's called NoOfRows(TableName), but check the HELP). Use the result of the system function in a control flow using IF .. THEN .. ELSE.
Thanks a lot! That does exactly what I needed.