Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
I'm trying to show the number of rows in a load script. It works when I wirte directly the name of the table in the function noOfRows, but is does not if I use a variable (for every other purpose the variable works).
Here a sample
SET TABLE_NAME_03 = Monthly_Sales;
 $(TABLE_NAME_03):
 LOAD 
 *  
FROM
 $(TABLE_NAME_03)_2016.qvd
 (qvd) 
let Rows_in_structure = NoOfRows($(TABLE_NAME_03)); => This line returns always NULL
let Rows_in_structure = NoOfRows('Monthly_Sales'); => This line returns the correct number of rows.
Does anybody knows how to use variable with the function NoOfRows?
Thank for your help
 its_anandrjs
		
			its_anandrjs
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Try this two ways for this
1. let Rows_in_structure = NoOfRows(TABLE_NAME_03);  //Without bracket and comma
2. let Rows_in_structure = NoOfRows('$(TABLE_NAME_03)'); //With comma
Regards
Anand
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		May be try single quotes around your variable:
LET Rows_in_structure = NoOfRows('$(TABLE_NAME_03)');
 its_anandrjs
		
			its_anandrjs
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Try this two ways for this
1. let Rows_in_structure = NoOfRows(TABLE_NAME_03);  //Without bracket and comma
2. let Rows_in_structure = NoOfRows('$(TABLE_NAME_03)'); //With comma
Regards
Anand
 
					
				
		
Hi, both versions (with comma) and (without comma and brakets) works.
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I provided one of those options, you seemed to not like my response  .
.
Just kidding, I am glad we were able to help you out here 
