1

I have to execute this script . The problem in that in SQL Developer i cant run it,since some operators are not recognized .

P_jobgroup_id :
'GDWH2MYGDWH-GDWH2MYGDWH'           CORE load finished
'GDWH2MYGDWH-GDWH2MYGDWH_IF'        IF finished
'GDWH2MYGDWH-GDWH2MYGDWH_INIT'  IF or CORE started

declare
 p_context_code          varchar2(100) := 'GDWH2MYGDWH';
 v_res                   varchar2(100);
begin
v_res := OJC.jc_master.main 
     (
      p_batch_number => NULL,
      p_jobgroup_id => 'GDWH2MYGDWH-GDWH2MYGDWH'),
      p_parameters_string => 'GDWH2MYGDWH.PRM_REPORTING_DATE='||to_char(sysdate,'yyyymmddhh24miss',
      p_context_code =>p_context_code
     );
end;
/

Error starting at line 1 in command: P_jobgroup_id : Error report: Unknown Command

Error starting at line 2 in command: 'GDWH2MYGDWH-GDWH2MYGDWH'
CORE load finished Error report: Unknown Command ORA-06550: line 8, column 50: PLS-00103: Encountered the symbol "," when expecting one of the following:

. ( * % & = - + ; < / > at in is mod remainder not rem

Aleksej
  • 22,443
  • 5
  • 33
  • 38
eda
  • 17
  • 2
  • 2
  • 8
  • What should the part before the `declare` do? – Aleksej Jan 25 '18 at 11:11
  • those are declarations related to the status of the release (gdwh2mygdwh) so if the Interface started(IF ) it should edit the table data to GDWH2MYGDWH-GDWH2MYGDWH_INIT. The main problem is how to run from declare and below. thanks – eda Jan 25 '18 at 11:21
  • Comment that part before DECLARE; it is invalid in this context, I'm afraid. – Littlefoot Jan 25 '18 at 11:22
  • The whole part before the DECLARE is invalid in PL/SQL - what do you expect that to do? Where in the [manual](http://docs.oracle.com/cd/E11882_01/appdev.112/e25519/toc.htm) did you find that syntax? –  Jan 25 '18 at 12:22
  • ok but how can i run the code after declare ? cause i can try removing that part of the code ,and see what is going to happen ... But still there are lot of other syntacts error such as => . – eda Jan 25 '18 at 12:55

1 Answers1

0

The first par of the script is not valid PLSQL code. Commenting or removing it will make the script run, once fixed a couple of syntax errors.

/*
    P_jobgroup_id :
    'GDWH2MYGDWH-GDWH2MYGDWH'           CORE load finished
    'GDWH2MYGDWH-GDWH2MYGDWH_IF'        IF finished
    'GDWH2MYGDWH-GDWH2MYGDWH_INIT'  IF or CORE started
 */
DECLARE
    p_context_code                          VARCHAR2(100) := 'GDWH2MYGDWH';
    v_res                                   VARCHAR2(100);
BEGIN
    v_res := OJC.jc_master.main
        (
         p_batch_number         => NULL,
         p_jobgroup_id          => 'GDWH2MYGDWH-GDWH2MYGDWH',
         p_parameters_string    => 'GDWH2MYGDWH.PRM_REPORTING_DATE=' || TO_CHAR(SYSDATE, 'yyyymmddhh24miss'),
         p_context_code         => p_context_code
        );
END;
/
Aleksej
  • 22,443
  • 5
  • 33
  • 38