SQL/MP Reference Manual
HP NonStop SQL/MP Reference Manual—523352-013
F-32
Functions
SQLCI-defined transaction ends. The FREE RESOURCES statement (without 
AUDITONLY) releases the locks.
>> VOLUME $VOL1.PERSNL;
>> INSERT INTO JOB VALUES (650, "ADMIN ASSISTANT")
+> REPEATABLE ACCESS;
-- 1 row(s) inserted.
 ...
>> FREE RESOURCES;
-- SQL operation complete.
This example shows FREE RESOURCES in a host program where it also 
deallocates buffer space used for cursors:
EXEC SQL OPEN CURSOR1;
 ...
EXEC SQL FETCH CURSOR1;
 ...
EXEC SQL DELETE FROM...
 WHERE CURRENT OF CURSOR1;
 ...
EXEC SQL FREE RESOURCES;
Functions
This table summarizes the functions in NonStop SQL/MP:
AVG Function Returns the average of a set of numbers
CAST Function Associates a data type with a parameter
COMPUTE_TIMESTAMP 
Function
Returns a Julian timestamp for a specified date and time
CONVERTTIMESTAMP 
Function
Converts a Julian timestamp to a DATETIME value
COUNT Function Counts the rows returned from a query or the distinct 
values in a column
CURRENT Function Returns the current date and time
CURRENT_TIMESTAMP 
Function
Returns a Julian timestamp for the current date and time
DATEFORMAT Function Formats a date-time value
DAYOFWEEK Function Returns an integer that represents a day of the week
EXTEND Function Adjusts the range of fields for a data-time value
JULIANTIMESTAMP 
Function
Converts a date-time value to a Julian timestamp
LINE_NUMBER Function
Returns the line number of the current detail line in a 
report
MAX Function
Returns a maximum value for a column or set of values










