Oracle Transportation Management (MOSC)

MOSC Banner

How to use Dynamic SQL in reports in OTM?

edited Oct 5, 2017 3:02PM in Oracle Transportation Management (MOSC) Question

Hello team,

The below one is giving error while compiling and what would be the value of P_NAME_PARAM  finally submits to the query. please suggest.

CREATE OR REPLACE PACKAGE PKG_SAMPLE_REPORT

IS P_NAME VARCHAR2(32766) := '1=1';

P_NAME_PARAM VARCHAR2(32766) := ‘1=1’;

FUNCTION AFTER_PFORM

RETURN BOOLEAN

IS P_NAME_PARAM := s.shipment_name || REPORTS_LIBRARY.GET_FILTER_CONDITION(PNAME, NULL, ‘Y’);

END AFTER_PFORM;

END PKG_SAMPLE_REPORT;

The data template would use the lexical to formulate a where clause:

<parameters>

<parameter name=”P_NAME” dataType=”character” defaultValue=”1=1”/>

</parameters>

<dataQuery>

<sqlStatement name="Q_1">

<![CDATA[SELECT s.shipment_gid, s.shipment_name

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center