Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
Hi Everyone,
How are you all?
Can someone please tell me how do I load only the fieldnames in a table from a resident table.
I need no data. All I need are the fieldnames(Names allocated in the resident table).
Thanks
 
					
				
		
 perumal_41
		
			perumal_41
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
Try Below Script helpful for U
Load * Resident tablename where 1=2;
try this script.
Regards,
Perumal.A
 gussfish
		
			gussfish
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
there are a couple of helpful functions you'll find in the Table
Functions section of the Reference Manual:
*
FieldName(n,'TableName') - gives you the name of the (n)th field
in your table.
*
NoOfFields('TableName') - gives you the number of fields in your
table
So, you should be able to use these together to load-in the names of all
your table's fields.
Angus.
 
					
				
		
 perumal_41
		
			perumal_41
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
Try Below Script helpful for U
Load * Resident tablename where 1=2;
try this script.
Regards,
Perumal.A
 
					
				
		
The where clause
Where RecNo() = 0;
also worked to load only tables and fields with no data and returned this
 
 
If you need to work with the table names and field names in QV objects (i.e. list boxes) then use $Table and $Field system fields.
In this example I counted number of unique values in each field.

Cheers
P
 
					
				
		
Thanks so much. That was the answer I was looking for.
Regards.
 
					
				
		
Thanks Angus, so much. You answer was really helpful.
Regards.
 
					
				
		
Thanks Pavol fpr your prompt response. You suggestion worked for me.
Regards.
