Get CSV Column Value as an Long Integer (CSV_BIGINT) UDF



CSV_BIGINT( csv_data, header => 'column header' );


CSV_BIGINT( csv_data, ID => relative-column ID );

The CSV Function parses the csv_data passed to it and returns the data for the column identified by the 2nd parameter. The 2nd parameter may be the relative column number or the column heading.

This Function is primarily used with the iQuery CSV() UDTF to parse the CSV content.

Returned Value

LONG LONG in C, BIGINT in SQL and in RPG IV int(20))

This UDF returns the column content as a numeric value in the form of an long integer ("BigInt" in SQL terminology) . It can be CAST to the specific length needed for the application. For example if the World Population 11-position numeric value,  then casting the column might look like the following:

 CAST( iQuery.csv_bigint(data, 'world population') as dec(11,0) )



Expected value:  DATA

The column DATA is returned from the iQuery CSV() UDTF. The parameter should be the column named "data" as returned by the CSV() UDTF. Any other value indicates customization of the interface and may produce undesirable results.


When the HEADER version of this UDF is used, the column heading (enclosed in single quotes) is specified to identify the column whose data is to be returned.


When the Relative Column ID version of this UDF is used, ID identifies the relative column number whose data is returned.