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

Contents
HP NonStop SQL/MX Programming Manual for C and COBOL523627-004
v
5. Simple and Compound Statements (continued)
5. Simple and Compound Statements (continued)
Compound Statements 5-13
Assignment Statement 5-15
IF Statement 5-16
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