602SQL Documentation Index  

602SQL Client API Functions (not from the SQL Standard)

Below is a list of functions that can be used in the SQL language even though they are not in the SQL standard. Some of the following functions overlap with functions defined by the SQL standard (e.g. conversion functions may be replaced with the CAST function).

Conversion functions (string conversion allows formatting of the result, unlike the CAST statement):
Str2int, Str2bigint, Str2real, Str2date, Str2time, Str2timestamp, Int2str, Bigint2str, Real2str, Date2str, Time2str, Timestamp2str, Datetime2timestamp, Timestamp2date, Timestamp2time, Ord, Chr

Mathematical functions:
Odd, Abs, Round, Trunc

Functions for handling date and time:
Make_date, Day, Month, Quarter, Year, Day_of_week, Make_time, Hours, Minutes, Seconds, Sec1000

E-mail functions and procedures - details.
InitWBMail, InitWBMailEx, CloseWBMail, LetterCreate, LetterAddAddr, LetterAddFile, LetterAddBLOBs, LetterSend, LetterCancel, MailOpenInBox, MailBoxLoad, MailBoxGetMsg, MailBoxGetFilInfo, MailBoxSaveFileAs, MailBoxSaveFileDBs, MailBoxDeleteMsg, MailCloseInBox, MailGetInBoxInfo, MailGetType, MailCreInBoXTables, MailCreateProfile, MailDeleteProfile, MailSetProfileProp, MailGetProfileProp

Thread synchronization
Create_semaphore, Close_semaphore, Release_semaphore, Wait_for_semaphore

Export_to_XML, Export_to_XML_CLOB, Import_from_XML, Import_from_XML_CLOB

Other functions
SQL602_build, SQL602_version, Who_am_I, Current_application, Set_password, Fulltext_index_doc, Get_property_value, Set_property_value, Get_server_info, Get_server_error_context

602SQL functions designed only for the 602SQL server (not in the client API):
Regexp_like, Sleep, Client_number, Admin_mode, Set_membership, Get_membership, Active_routine_name, Invoke_event, Schema_uuid, Fulltext_get_context, Local_schema_name, _sqp_define_log, _sqp_trace, _sqp_log_write, _sqp_profile_all, _sqp_profile_thread, _sqp_profile_reset, _sqp_profile_lines

You can also use the standard procedure SQL_execute, procedure Free_deleted, procedure Truncate_table and procedure Log_write on the server (you must call these using the CALL statement (CALL Free_deleted("MY_TABLE")). You can set 602SQL server parameters using the Set_sql_option procedure, and obtain these parameters using the Get_sql_option function.