Using the Expression Editor

The expression editor provides selectable values to build an SQL expression, using String, Number, Date, Boolean, and conversion functions. You can also select from a list of SQL functions, separators, operators, and system variables such as PMS_P.BUSINESS_DATE or PMS_P.RESORT.

Use the [ADD] [ADD BEFORE] and navigation controls to determine the placement of the selected function, operator, separator, string or numeric values.

Note:

To join multiple string elements together use the ‘||’ concatenation operator in your expression.

Table 8-2 Example of expressions

Type Expression

Pre Export Procedure

EXP_GENERAL_RESV_PKG.SET_EXP_START_DATE(PMS_P.BUSINESS_DATE)

Post Export Procedure

exp_create_data.delete_report_table

Filter condition

inactive_date is null and NAME_TYPE = 'D' and COUNTRY = 'US' and FIRST is not null and TOTAL_ROOM_REVENUE > '1000'

Filter condition

business_date=to_char(pms_p.business_date-1,'DD-MM-YY')

Filename

'CR'||pms_p.resort||lpad(to_char(pms_p.business_date,'DDD'),3,'0')

Filename

'DRS'||SUBSTR(HOTEL_CODE,1,5)||TO_CHAR(EXP_GENERAL_RESV_PKG.EXP_START_DATE(),'DDD')

Filename

'DCO_'||pms_p.resort||to_char(pms_p.business_date,'MMDDYY')

Filename

'STAT_'||pms_p.resort||'_'||to_char(sysdate,'YYYYMMDD')

  1. Click the pencil icon to create or edit an SQL expression.

  2. Select a procedure, API, operator, function or other element from the list.

    OR

  3. Enter text into String field to add text to the expression.

    OR

  4. Enter a numeric value to the Number field to add a number to the expression.

  5. Click [ADD] to append the selection after the yellow highlighted entry.

  6. Click [REPLACE] to replace the highlighted entry

  7. Click [DELETE] to delete highlighted entry

  8. Use [<] and [>] to move through the entries in the expression.

  9. Repeat steps to construct the expression; inserting elements where required.

  10. Click OK when complete.


Edit_pre-export_procedure

Related Topics