NAME
SQLselectRow - execute a select statement, return a specific row

SYNOPSIS
SQLselectRow [ -1d ] row_number result_array select_statement

DESCRIPTION

The SQLselectRow command executes the SQL select_statement and returns row row_number in the Tcl array result_array. The first column of data will be in result_array(row_number,0), the second column of data will be in result_array(row_number,1). The return value of SQLselectRow is the number of columns in result_array. If row row_number is not found, then SQLselectRow returns 0. SQL errors are handled by appending the SQL error message to the results and returning TCL_ERROR. row_number must be a positive integer. SQLselectRow 0 . . has the same functionality, and returns the same value as SQLcolNamesSelect . . ..

This command is a specialized form of SQLexec(3).

SQLselectRow stops fetching rows after row row_number has been retrieved.

This command uses a private, statically allocates SQL Data Area (SQLDA). Use of this command will not conflict with user defined cursors.

OPTIONS

-1d result_array will be a one dimensional Tcl array. Usually, result_array is returned a two dimensional Tcl array, even if there is only one column of data.

EXAMPLE
This command returns row number 2 into the Tcl array res_row:

             SQLselectRow 2 res_row * from vertex2

KEYWORDS
database, select

SEE ALSO
SQLselect(3), SQLselectColNames(3)

BUGS
Note that Ingres 6.4 does not allow interleaved access to two open cursors. Commands like SQLfetch and SQLselectRow both access two different cursors.