Share this page

# Syntax Examples

## Example A

The following example shows a query with `select` statement in relation to PPM when using tokens. The syntax includes single quotes when a nested token is of `VARCHAR2` data type.

Note: No need to include single quotes when a nested token is of `Number` data type.

Syntax:

    -- Set SLA Violation Date From Requestor Priority
    select
           to_char(client_SLAs( '[REQ.P.INS_CO_SLA_PRIORITY_REQUESTOR]',
                                '[REQ.VP.LN_CO_CLIENT]',
                                ( select "SLA_Days" from CP_SLAs@ReqproProd
                                  where "Client" = '[REQ.VP.LN_CO_CLIENT]'
                                  and "SLA_Code" = '[REQ.P.INS_CO_SLA_PRIORITY_REQUESTOR]'
                                ),
                                '[REQ.P.LN_IMPACTED_ENVIRONMENT]',
                                ( select "Date_Type" from CP_SLAs@ReqproProd
                                  where "Client" = '[REQ.VP.LN_CO_CLIENT]'
                                  and "SLA_Code" = '[REQ.P.INS_CO_SLA_PRIORITY_REQUESTOR]')
                              ),
                              'YYYY-MM-DD HH24:MI:SS'
                   ),
           to_char(client_SLAs( '[REQ.P.INS_CO_SLA_PRIORITY_REQUESTOR]',
                                '[REQ.VP.LN_CO_CLIENT]',
                                 ( select "SLA_Days" from CP_SLAs@ReqproProd
                                   where "Client" = '[REQ.VP.LN_CO_CLIENT]'
                                   and "SLA_Code" = '[REQ.P.INS_CO_SLA_PRIORITY_REQUESTOR]'
                                 ),
                                 '[REQ.P.LN_IMPACTED_ENVIRONMENT]',
                                 ( select "Date_Type" from CP_SLAs@ReqproProd
                                   where "Client" = '[REQ.VP.LN_CO_CLIENT]'
                                   and "SLA_Code" = '[REQ.P.INS_CO_SLA_PRIORITY_REQUESTOR]')
                               ),
                               'YYYY-MM-DD HH24:MI:SS'
                   ),
             '',
             ''
    FROM DUAL

## Example B

Here is a syntax example of PL/SQL function:

`select LN_CUSTOM.ValidateCompanions('[REQ.P.LNCOMPANIONREQNO]') from dual`

This syntax launches a `select` statement and returns the result back into `LN_WARNING`.

https://admhelp.microfocus.com PPM 8942
Tips to improve your search results... OpenText™ Project and Portfolio Management Help Center PPM Help 26.2-26.3 All View Local Help Center View Online Help Center Version: