QueryColumnList

This function returns the delimited column list of a query.

Method Signature

QueryColumnList(query=[query])

Arguments

Argument
Type
Required
Description
Default

query

query

true

The query to get the column names from

Examples

Create a query and output the column list

Run Example

myQuery = queryNew( "ID,name,age" );
writeOutput( queryColumnList( myQuery ) );

Result: ID,name,age

Using a member function

Run Example

myQuery = queryNew( "ID,name,age" );
writeOutput( myQuery.columnList() );

Result: ID,name,age

Additional Examples

Run Example

qry = queryNew( "aaa" );
arr = arrayNew( 1 );
arr[ 1 ] = "a";
arr[ 2 ] = "b";
arr[ 3 ] = "c";
QueryAddColumn( qry, "bbb", arr );
QueryAddColumn( qry, "ccc", arr );
writeDump( queryColumnList( qry ) );

Last updated

Was this helpful?