Previous Topic

Next Topic

Get Data

Valid in: ESQL

The GET DATA statement reads a segment of a long varchar, long nvarchar, or long byte column from a table to an embedded SQL program.

The GET DATA statement is used in data handler routines. For details about data handler routines, see the chapter "Working with Embedded SQL" and the Embedded SQL Companion Guide.

Previous Topic

Next Topic

Syntax

The GET DATA statement has the following format:

EXEC SQL GET DATA(:col_value = SEGMENT
              [, :length_value = SEGMENTLENGTH]
              [, :dataend_value = DATAEND])
              [WITH MAXLENGTH = maxlength_value;]

The host language variables for col_value, length_value, dataend_value and maxlength_value must be declared in a BEGIN DECLARE SECTION/END DECLARE SECTION block to the ESQL preprocessor.

If a data handler routine attempts to exit without issuing an ENDDATA statement, the DBMS Server issues a runtime error.

Previous Topic

Next Topic

Permissions

All users are permitted to use this statement.

Previous Topic

Next Topic

Related Statements

Put Data


© 2007 Ingres Corporation. All rights reserved.