Using SQL statements

This SQL is an example that shows how to use to_char() with the correct format. The SQL statement must be the same for steps 1 and 4.

This example is valid when the database that is used is Oracle, since to_char is a format function of Oracle.

  1. In the Database Schema Configurator, click Add SQL Statement Schema to open the SQL Statement Schema Configurator dialog box.
    1. For Name, specify testFormat.
    2. For SQL Statement, specify this SQL statement:
      SELECT to_char(CASE.ADMITDATE,'YYYY-MM-DD HH24:MI:SS') as FORMAT_ADMINDATE, CASE.CASE_ID, PATIENT.NAME, PATIENT.PATIENT_ID 
      FROM CASE, PATIENT
      WHERE CASE.PATIENT_ID = PATIENT.PATIENT_ID
  2. Click OK to close the dialog box.
  3. Save the configuration.
  4. In Network Configurator, select the database-inbound protocol for the thread to configure, and click Properties.
    1. In the Database Inbound Protocol Properties dialog box, for Table Schema select the testFormat table schema created in step 1.
    2. In the Read Action tab, select the SQL Statement option and specify the content listed in step 1.
  5. Click OK to exit the dialog box.
  6. Save the configuration.