Entering content frame

Procedure documentation sql_executenice Locate the document in the library structure

Use

You transfer an SQL statement to the database instance. Unlike when you use the DBM command sql_execute , you want the reply to display one data record after another.

After you execute the SQL statement, the system returns an OK message or displays the first data record of the reply. To display all the other data records one by one, use the sql_fetchnice DBM command.

For more information about SQL statements, see the Reference Manual and SQL Tutorial

Prerequisites

·        You are working in the session mode of the Database Manager CLI.

·        You have the server authorization AccessSQL.

Syntax

sql_executenice <statement>

<statement>

SQL Statement

Reply

OK

[END | CONTINUE]

[<record>]

Values for the Reply Fields

Value

Description

END

The complete reply was output.

CONTINUE

More data records are available but were not transferred due to the limited size of the reply memory.

<record>

A data record of the result of the SQL statement

The fields in a data record are separated by semicolons.
Character strings are output in single quotation marks.

Example

Logging on to the Database Manager CLI in session mode as operator OLEG with the password MONDAY, connecting to the DEMODB database instance, displaying the columns of theUSERS table record by record with the relevant comments:

>dbmcli -u OLEG,MONDAY -d DEMODB

dbmcli on DEMODB>sql_executenice SELECT columnname, comment FROM domain.columns WHERE tablename = 'USERS'

OK

CONTINUE

COLUMNNAME                     = 'OWNER'

COMMENT                        = (long)

 

---

dbmcli on demodb>sql_fetchnice

OK

CONTINUE

COLUMNNAME                     = 'GROUPNAME'

COMMENT                        = (long)

 

---

dbmcli on demodb>sql_fetchnice

...

...

 

 

 

Leaving content frame