Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
maniram23
Creator II
Creator II

function

Hi experts,

what are the table functions? give me an example of each and every one.

2 Replies
jagan
Partner - Champion III
Partner - Champion III

Hi Mani,

Check this functions

The table functions return information about previously loaded data tables.

FieldName(nr ,'TableName')

Returns the name of the field with the specified number within a previously loaded table.

If the function is used within a load statement, it must not reference the table currently being loaded.

Examples:

LET a = FieldName(4,'tab1');

T1:
Load a, b, c, d from abc.csv
T2:
Load FieldName (2, 'T1') Autogenerate 1;

FieldNumber('field ' ,'TableName')

Returns the number of a specified field within a previously loaded table.

If the function is used within a load statement, it must not reference the table currently being loaded.

Examples:

LET a = FieldNumber('Customer','tab1');

T1:
Load a, b, c, d from abc.csv
T2:
Load FieldNumber ('b', 'T1') Autogenerate 1;

NoOfFields([ 'TableName ' ])

Returns the number of fields in a previously loaded table.

Examples:

LET a = NoOfFields('tab1');

Load *, NoOfFields( ) from abc.csv;

NoOfRows('TableName ' )

Returns the number of rows (records) in a previously loaded table.

If the function is used within a load statement, it must not reference the table currently being loaded.

Examples:

LET a = NoOfRows('tab1');

Load * from abc.csv where NoOfRows( )<30;

NoOfTables()

Returns the number of tables previously loaded.

TableName( 'TableNumber' )

Returns the name of the table with the specified number.

If the function is used within a load statement, it must not reference the table currently being loaded.

TableNumber( 'TableName' )

Returns the number of the specified table.

If the function is used within a load statement, it must not reference the table currently being loaded.

robert_mika
Master III
Master III

Just to add:

    

FunctionSyntaxFront EndBack End
FieldNamestr FieldName (field_number, table_name)NoYes
FieldNumberint FieldNumber (field_name, table_name)NoYes
NoOfFieldsint NoOfFields (table_name)NoYes
NoOfRowsint NoOfRows (table_name)YesYes