Retrieve any column from any table#

Functionality:#

This function retrieves a column value from a table

Parameters:#

TABLE_NAME Either the full table name (e.g. P2K_HR_IDENTITIES) or the table alias (e.g. EID)
COLUMN_NAME The column name from that table that you wish to retrieve
REFERENCE_ID The ID of the record that you are seeking the data for

Returns: #

Varchar2 (regardless of the type of data being requested)

Errors: #

*err: table name* When there is no table found in IMTD with the name, or alias provided
*err: column name* When there is no column name found in IMCD with that name, for the table provided.
*err: invalid column length*When the column is a BLOB, or has a maximum length in excess of 4,000 characters
*err: ORA-xxx is issued when any other error occurs.

Example: #

P2K_PU.GC('EID','FIRST_NAME',~) - Using Identity ID as the third parameter (~)

Will return the First Name the employee from P2K_HR_IDENTITIES, identified by the ID in the third parameter

P2K_PU.GC('P2K_PR_PAY_RUNS','DISBURSED',~) - Using Pay Run ID as the third parameter (~)

Will return the DISBURSED flag, for the payrun identified by the ID in the third parameter

Note that DATE field types will return the date as a character in DD-MON-YYYY format, so if you want to reformat using a date format mask, then you will need to convert to a date type using the TO_DATE function.


Notes#

Click to create a new notes page