|
This method has been deprecated and should not be used in Profile versions v6.4 and above. There are more effective ways of performing the function previously fulfilled by the Db.getOneRow method. At a future date, this method may be removed from the PSL compiler. Therefore, FIS recommends that instead of using the Db.getOneRow method, instantiate the object using Db.getRecord. |
Class: Db
Syntax
Db.getOneRow(columnList,tableName,accessKeys,delimiter)
Parameters
columnList |
A comma-separated list of columns to retrieve from the table. |
tableName |
A valid database table name. |
accessKeys |
A comma-separated list of access keys for the table. This parameter can also specify an assignment (e.g., "ACN=:CIFNUM") or a column reference (e.g., DEP.ACN). |
delimiter |
An ASCII number that acts as a field delimiter. The default delimiter is a TAB. |
Returns
A string of column data, separated by delimiters.
Description
This method retrieves columns from a single record from the database without creating an object. Only use this method for Read Only information, such as User, System, Common, and Institution Variables tables.
When Became Available
Profile v6.3
Examples
// Select a single column
set des = Db.getOneRow("DESC","UTBLBRCD","BR")
// Select columns from table without key
set TJD = Db.getOneRow("TJD","CUVAR")
// Select multiple columns
set data = Db.getOneRow("CID,BAL,LNM,BOO,IRN","DEP","XCID")
// Select computed column
set data = Db.getOneRow("ACN,TAXID,AGE","CIF","XACN")
// Select columns from table with multiple keys
set data = Db.getOneRow("TAMT,TCMT","HIST","XCID,YSEQ")