SQL/MX Programming Manual for C and COBOL (H06.10+, J06.03+)

Contents
HP NonStop SQL/MX Programming Manual for C and COBOL544617-003
v
5. Simple and Compound Statements (continued)
5. Simple and Compound Statements (continued)
Using PROTOTYPE Host Variables as Table Names 5-17
6. Static SQL Cursors
DML Statements for Static SQL Cursors 6-1
Steps for Using a Static SQL Cursor 6-2
Declare Required Host Variables 6-4
Declare the Cursor 6-4
Initialize the Host Variables 6-5
Open the Cursor 6-5
Retrieve the Values 6-6
Process the Retrieved Values 6-7
Fetch the Next Row 6-10
Close the Cursor 6-11
Using Date-Time and INTERVAL Data Types 6-12
Standard Date-Time Example 6-12
Nonstandard SQL/MP DATETIME Example 6-13
Interval Example 6-13
Using Floating-Point Data Types 6-14
Considerations When Using a Cursor 6-14
Cursor Position 6-15
Cursor Stability 6-15
Cursor Sensitivity 6-16
7. Static Rowsets
What Are Rowsets? 7-1
Using Rowsets 7-2
Declaring Host Variable Arrays as Rowsets 7-2
Considerations for Rowset Size 7-3
Specifying Rowset Arrays 7-4
Using Rowset Arrays for Input 7-5
Using Rowset Arrays for Output 7-6
Using Rowset Arrays in DML Statements 7-6
Selecting Rows Into Rowset Arrays 7-6
Selecting Rowsets With a Cursor 7-12
Inserting Rows From Rowset Arrays 7-14
Updating Rows by Using Rowset Arrays 7-17
Deleting Rows by Using Rowset Arrays 7-19
Specifying Size and Row ID for Rowset Arrays 7-20