Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a script that loads only new records from a Source table into a QVD. I want to be able to state the # of new rows that are being loaded in a Trace Statement. See below for an example.
Sales:
Load ID,*
From QVD;
TRACE New Rows being loaded;
CONCATENATE (Sales)
Sales:
Load ID,*
From Source
WHERE NOT EXIST ID;
TRACE "x" rows loaded into Sales;
Hi Michael
You can use the function NoOfRows(NameOfTable)
After the first load, you assign NoOfRows to a varable, trace the value and do the same after the second load
Let vNumberOfRows = NoOfRows(Sales);
Trace $(vNumberOfRows);
Eduardo
Hi Michael
You can use the function NoOfRows(NameOfTable)
After the first load, you assign NoOfRows to a varable, trace the value and do the same after the second load
Let vNumberOfRows = NoOfRows(Sales);
Trace $(vNumberOfRows);
Eduardo
You need to create a Variable like below
Let vNoOfRows = NoOfRows('TableName');
Trace $(vNoOfRows);
I had to put a If statement to show 0 row if none were added but it worked. Thanks for the quick response.
Sales:
Load ID,*
From QVD;
TRACE New Rows being loaded;
CONCATENATE (Sales)
Sales:
Load ID,*
From Source
WHERE NOT EXIST ID;
LET vNumberofRows = IF(LEN(TRIM(NoOfRows('Sales')))=0,0,NoOfRows('Sales'));
Trace $(vNumberofRows) rows added;