get sql column names()
Included in the standard from version 4.6.12, but commented out. See class name "BasicGetSqlColumnNames" in configuration file ./etc/admin/datawizard/filter.properties.
This function writes all the column names of the SQL statement a into list d.
The return value of the function is the number of elements inserted into the list or "-1" (see parameter e).
Parameters
Parameter |
Description |
a |
The SQL select statement. |
b |
The database alias. |
c |
Name of the list for the SQL parameters. See example. |
d |
Name of the list for the column names. Note: List is emptied beforehand. |
e |
(optional) If true, occurring SQL errors are ignored (instead of profile termination with error) and the return value is -1. Default: false. |
Examples
Assume list myparams={1341706}. Relevant for parameter c in last example.
Parameter a |
Parameter b |
Parameter c |
Parameter d |
Parameter e |
Result |
select * from dw_suspend |
hub |
|
mylist |
false |
List mylist={file_reference,profile_id,profile,client,restart_in,is_suspended,file_name,backup_name} and return value 8. |
select file_reference, profile_id from dw_suspend |
hub |
|
mylist |
false |
List mylist={file_reference,profile_id} and return value 2. |
select date_at,name from dw_log where dw_job=@1:i@ |
hub |
myparams |
mylist |
false |
List mylist={date_at,name} and return value 2. Note: @1:i@ is resolved to 1341706, see list myparams and function select-statement a [[param &1 = c], d,e, f,g,h,i,j], default k,l,m,n dbAlias = b for details. |