How to get the return in this example

Hi all,

In this simple example, is there an exception caused by the business logic. However, I would like to get the return value of 'p_dt' which will be stored in a table of newspaper, but when the exception occurs that the value is eliminated. How can I solve this? Thank you for your help.
SQL> select * from v$version where rownum = 1;

BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
create table test as(select 1 id, to_date('01/01/2009','dd/mm/yyyy') dt from dual)
/

Create OR Replace Package Pkg_Test Is

   Procedure Prc_Call_Test;

End Pkg_Test;
/

CREATE OR REPLACE Package Body Pkg_Test Is

   Procedure Prc_Test( p_id In  Pls_Integer
                     , p_dt OUT Date ) Is
   Begin
      SELECT DT
        INTO p_dt
        FROM TEST
       WHERE ID = p_id;

      If p_dt < Sysdate Then
         Raise_Application_Error(-20000, 'Anything');
      End if;
   End Prc_Test;


   Procedure Prc_Call_Test
   Is
      v_dt Date;
   Begin
      Prc_Test(1, v_dt);
      Dbms_Output.put_line(v_dt); -- the return is null
   End Prc_Call_Test;

End Pkg_Test;
/
Kind regards

If you use NOCOPY in the parameter, then the value will be applied directly to the variable of output as it get set to so it will not be lost when the exception occurs. So, of course, to capture the exception or anything to access your dbms_output statement, but it is trivial...

SQL> ed
Wrote file afiedt.buf

  1  CREATE OR REPLACE Package Body Pkg_Test Is
  2     Procedure Prc_Test( p_id In  Pls_Integer
  3                       , p_dt OUT NOCOPY Date ) Is -- Note the use of NOCOPY on the parameter
  4     Begin
  5        SELECT DT
  6          INTO p_dt
  7          FROM TEST
  8         WHERE ID = p_id;
  9        If p_dt < Sysdate Then
 10           Raise_Application_Error(-20000, 'Anything');
 11        End if;
 12     End Prc_Test;
 13     Procedure Prc_Call_Test
 14     Is
 15        v_dt Date;
 16     Begin
 17       BEGIN
 18         Prc_Test(1, v_dt);
 19       EXCEPTION
 20         WHEN OTHERS THEN -- Capture the correct error here rather than OTHERS
 21           dbms_output.put_line('Error occurred in prc_test');
 22       END;
 23       Dbms_Output.put_line(v_dt); -- the return is null
 24     End Prc_Call_Test;
 25* End Pkg_Test;
SQL> /

Package body created.

SQL> exec pkg_test.prc_call_test;
Error occurred in prc_test
01/01/2009 00:00:00

PL/SQL procedure successfully completed.

SQL>

Tags: Database

Similar Questions

  • How to get the device model, for example app works on PlayBoook or BlackBerry 10?

    How to get the device model, for example app works on PlayBoook or BlackBerry 10?

    You can use this class: http://goo.gl/GtMLP for information on devices

    something like this:

    String myDeviceModel = android.os.Build.MODEL;
    String myDeviceBrand = android.os.Build.BRAND;
    String myDeviceDevice = android.os.Build.DEVICE;
    
  • How to get the return value from Java runtime.getRuntime.exec?

    I am running shell from a (GR 11, 2) Oracle database commands on aix.
    But, I would get a return value of a shell comand... as you get with "echo $?"

    I use a code like
    CREATE OR REPLACE JAVA SOURCE NAMED common."Host" AS
    import java.io.*;
    public class Host {
      public static int executeCommand(String command) {
        int retval=0;
        try {
            String[] finalCommand;
            finalCommand = new String[3];
            finalCommand[0] = "/bin/sh";
            finalCommand[1] = "-c";
            finalCommand[2] = command;
    
          final Process pr = Runtime.getRuntime().exec(finalCommand);
          pr.waitFor();
    }
       catch (Exception ex) {
          System.out.println(ex.getLocalizedMessage());
          retval=-1;
        }
        return retval;
    };
    /
    but I do not get a return value... because I don't know how to get the return value...

    Published by: user9158455 on 22-Sep-2010 07:33

    Hello

    Your pr.exitValue () has tried?

    I think you also need a finally block that destroys the sub-process

    Concerning
    Peter

  • How to get the return parameter in sequence teststand ran by labview labview

    Hello

    Executes a test sequence of labview (essentially running "\Examples\TestStand API\Executing sequences using API\LabVIEW\Execute with no Model.vi process") I need to get a parameter returned in 'Settings', after the sequence has run.

    My problem is that I get the value upon registration of the sequence and not the value after execution.

    How?

    Vagn

    Vagn,

    in order to obtain the values of the execution, you need access to execution. The following screenshot shows how to access.

    Please note that this VI is lying will be called by TestStand. DO NOT USE THIS VI IN A CUSTOM USER INTERFACE!

    Thank you

    Norbert

    EDIT: This dummy code shows how to read the string parameter 'Return '. Each parameter must be read separately with appropriate playback function.

  • [JS CS4/CS5/CS5.5] How to get the return value from Javascript using doScript

    Hi all

    I'm calling javascript from COM (c#) and it works fine. Passing parameters to javascript and playback by using the syntax of the [x] arguments also works very well.

    What I can't seem to get to work is to know how to move something from javascript to the calling COM Summoner, in this case, c#. How and where should I place the return value in javascript?

    Thanks in advance.

    Rachiud

    doScript() evaluates an expression, so just make sure that your Javascript is an expression.

    For instance "(3 + 3)" 6 "

  • [Quebec] How to express the variable in this example?

    I want to know how to express this variable in this example in the red part

    / * Variable * /.
    $old = ['old'] $row_rs_archive;
    $new = $row_rs_archive ['new'];
    $total = old + $nouveau;
    echo $total;

    If (array_key_exists ('must', $_POST)) {}
    $done = mysql_query ("UPDATE cur_total SET temp = $total'") or die (mysql_error ());
    }

    works fine echo and enter the value total, but in the UPDATE command, it does not.

    I get this error

    1500 unknown column '$total' in 'field list '.

    notice of 1500 just echo $total

    Thank you...

    I took a quick glance, but I suspect it's because you use single quotes for the query string. PHP will not analyze the variables in single quotes, and he will treat it as a literal string.

    Try this:

    $done = mysql_query ("set a DAY cur_total SET temp = $total") or die (mysql_error ());

    If that is not quite get you there, try rather concatenation.

  • How to get the return value of the method by calling the stored procedure in ApplModuleImpl

    Hello

    I use Jdev 10.1.3.4
    JSF, and ADF business components
    I created a service method in the implementing class of module request to execute the strored procedure in the database.
    This breeding returns a string value.
    now, I slipped the method of service of data control palette on my JSF page and chose ADF parameter form when I droped.
    It works very well.
    now, I want to display the string returned by the method of service after the execution on the JSF page as global messages.
    How can I achieve this.
    Help, please

    Thanks in advance

    Kind regards
    Ajit Agarwal

    Hello

    You must run programmatically run the method binding. If I'm not wrong then the following code will allow you to access the return value

    OperationBinding oper = bindings.get("MyPLSQLAccessMethodBinding") (OperationBinding);
    String returnValue = oper.execute ((String));

    Once you have the string in a managed bean you can add it to the stack of messages JSF exposed by the FacesContext

    Frank

  • How to get the return value of the activity of the method in the stubborn workflow

    Hi all

    I use Jdeveloper 11 g R2 (11.1.2.3) & Weblogic 10.3.5.0

    I have a stubborn workflow, default activity is a call method than calling a method in the app module
    This method returns an id

    I need this code in my project to do something else
    Is there a way I can access the return value of the method call activity?

    Concerning
    Mohsen

    Set the value of return as #{{pageFlowScope.myBean.returnValue} pageFlowScope.myBean.returnValue} in the method, call the property inspector and get the value in your managed bean.

    String returnParam = (String) JSFUtil.getFromPageFlow ("returnValue");

  • How to get the substring of this string

    Hi friends,

    "ERF/11/414/KWT/IRC762.

    in this I need the string after C...

    I have to select the channel and finds the first occurrence of C in the last string and get the number after C every time
    what the chain can be

    I always check the first occurrence of C in the last... and retrun the number after the C

    How to make

    pls let me know

    He should give me the chain until the IRC avoiding 762

    This?

    SQL> select regexp_substr ('ERFC/11/414/KWT/IRC762', '.*C') num from dual
    /
    NUM
    ----------------------------
    ERFC/11/414/KWT/IRC     
    
  • Can someone show me how to get the data of this vi in four columns in a spreadsheet file.

    I'm trying to get the data into four columns on a worksheet. The data consists of two channels and two measures, a maximum voltage and a voltage after x seconds. I enclose the code. Any help would be great. Thank you.


  • How to get the return value in sqlplus to index?

    Hello

    I am a PL/SQL Developer, and I have a problem with an existing batch.

    Here's the situation:
    I have a lot of unix, calling a first script sql with sqlplus (call script0.sql )
    script0. SQL call other scripts sql with the command @ (script1.sql, script2.sql,... = > scriptx.sql )
    My version of sqlplus is 9.2.

    ScriptX.SQL modifies the data in table with insert or update and not commit or rollback anything (it is in charge of script0.sql ).
    If there is an error produced in a clue all changes must be rollbacked.
    Unfortunately when something fails, it returns only to script0.sql without any information on his breaks down, so continuous script0.sql and when he arrivals all changes are committed because the State of script0.sql is successful when the exit is made.

    Is there an equivalent of the $? UNIX in sqlplus to obtain the return of a status @scriptx.sql?

    -----
    Here is the general syntax of the script0.sql :

    WHENEVER SQLERROR EXIT 99;
    WHENEVER OSERROR EXIT 98;

    @script1.sql
    @script2.sql

    "exit";
    -----

    Here's a simple scriptx.sql file:

    Insert into table values (x) (y);

    -----

    Published by: user10713865 on October 30, 2009 06:51

    Hello

    You can use 'Whenever SQLERROR WHAT' options to build the logic.
    Use: 'every time THAT SQLERROR EXIT DISMANTLING', if you want to there are a whole script error
    OR "WHEN SQLERROR CONTINUE ROLLBACK", if you want to restore and continue to the next.
    You might explore other options 'whenever SQLERROR WHAT' to suit your logic and add "COMMIT / ROLLBACK" to not relevant.

    See sample tests below:

    SQL> create table t1 (col1 number primary key);
    Table created.
    

    * 1. In script1 case fails, then restore and exit *.

    kallo:f632736> cat 1.sql
    WHENEVER SQLERROR EXIT ROLLBACK
    insert into t1 values(1);
    insert into t1 values(1);
    kallo:f632736> cat 2.sql
    insert into t1 values(2);
    kallo:f632736> cat main.sql
    @1
    @2
    
    SQL> @main
    
    1 row created.
    
    insert into t1 values(1)
    *
    ERROR at line 1:
    ORA-00001: unique constraint (ADMLHMGM.SYS_C0013874) violated
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    
    SQL> select * from t1;
    
    no rows selected
    

    * 2. When script1 fails, then restore and continue to script2 *.

    kallo:f632736> cat 1.sql
    WHENEVER SQLERROR CONTINUE ROLLBACK
    insert into t1 values(1);
    insert into t1 values(1);
    
    SQL> @main
    
    1 row created.
    
    insert into t1 values(1)
    *
    ERROR at line 1:
    ORA-00001: unique constraint (ADMLHMGM.SYS_C0013874) violated
    
    Rollback complete.
    
    1 row created.
    
    SQL> select * from t1;
    
          COL1
    ----------
             2
    
  • How to get the return value of INSERT... RETURN clause?

    Hello

    With the help of the WEST, how I'm supposed to retrieve the value returned by queries like:

    INSERT INTO... VALUES (...) RETURN xxx IN: res

    ?

    Thank you
    Kiril

    It works for me. Someone posted the code for him on this thread:
    BLOB vs BFILE

    I tested successfully an integer column and also return the rowid of INSERTION. Note that the call to registerOutParam is necessary - without that I just became a string vacuum back to rowid.

    I tested with 11.2 customer against 10.2 server.

  • How to get the return values by a button on the main program.

    Hello

    I have a main program that has an Authenticate button. Click to authenticate open for auth form that has the USERNAME and PASSWORD FIELDS.
    If the input fields are true then enable editing of jtable in main program...

    Basically something like this:
    main program
    Authenticate.addActionListener (new ActionListener()
    {
    public void actionPerformed (ActionEvent ae)
    {
    Au UpdateAuth = new UpdateAuth(); / / Opens the form that has the username and pass for authentication
    ua.setVisible (true);

    need code for activation of table here
    if(s=="mactus")
    {
    enable editing of the table
    }
    table.repaint ();
    }

    });


    form opened for auth... (class UpdateAuth)

    private String SigninMouseClicked (java.awt.event.MouseEvent evt) {}
    String aname = Aname.getText ();
    String apass = Apassword.getText ();
    If (aname. Equals("") & & apass.equals(""))
    {
    JOptionPane.showMessageDialog (null, "enter the login name or password", "Error", JOptionPane.ERROR_MESSAGE);
    }
    If (!) (Aname.Equals("")) & & apass.equals("")))
    {
    If (aname. Equals("harshil") & & apass.equals ("harshil123"))
    {
    String s = "mactus"; If the user name and password is success enable editing in table in the main program
    return s;

    }
    else if (! aname.equals ("mactus") & &! apass.equals ("mactus123"))
    {
    Aname.setText("");
    Apassword.setText("");
    }
    }
    Returns a null value.
    }

    String.Equals (String)

    String.equalsIgnoreCase (String)

  • How to get the result using this query?

    Hi using iam under query,

    WITH CTE (SNO, ID, PNT)

    AS

    (SELECT ROWNUM as SNO, TRANS_ID, VCN_NO OF)

    SELECT V.TRANS_ID, V.VCN_NO IN VSL_MOVES V

    WHERE V.END_TIME > = TRUNC (TO_DATE (: pStartDate, ' dd/MM/yy HH24')) AND V.END_TIME < = TRUNC (TO_DATE (: pEndDate, ' dd/MM/yy HH24'))

    AND V.MOVEMENT_TYPE_CODE NOT IN ORDER ("ATA") OF V.VCN_NO, V.END_TIME))

    SELECT ROWNUM as SNO, TAB. VESSEL_NAME, TAB. FLAG, TAB. IMO_NO, TAB. ARRIVED_DATE, TAB. F_ROM,

    NVL ((SELECT CASE WHEN VMS. MOVEMENT_TYPE_CODE = 'ATS' THEN (SELECT TO_CHAR (NBV. ATD, "DD/MM/YYYY HH24") OF PNTS WHERE NBV. DOC_NO = TAB. VCN_NO AND ROWNUM < = 1) WHEN VMS. MOVEMENT_TYPE_CODE = 'ATB' THEN (SELECT TO_CHAR (VBU. BRTH_ALL_FAST, "DD/MM/YYYY HH24") OF VSL_BERTH_UNBERTH VBU WHERE VBU. BERTH_TRANS_ID = VMS. TRANS_ID AND ROWNUM < = 1) END ELSE NULL VSL_MOVES VMS WHERE VMS. TRANS_ID = TAB. (T_ID),'-') Sailed_Date,.

    NVL ((SELECT CASE WHEN VMS. MOVEMENT_TYPE_CODE = 'ATS' THEN (SELECT P.PORT_NAME OF RRS, PORT_MASTER P WHERE P.PORT_CODE = PNT. VSL_NXT_PRT_CALL AND PNT. DOC_NO = TAB. VCN_NO) WHEN VMS. MOVEMENT_TYPE_CODE = 'ATB' THEN (SELECT CASE WHEN VBU. BERTH_CODE LIKE "% VOPK" AND THEN "VOPAK" WHAT VBU. BERTH_CODE AS "VSPM %" THEN "VOPAK" ELSE "POF" VBU VSL_BERTH_UNBERTH END WHERE VBU. BERTH_TRANS_ID = VMS. TRANS_ID AND ROWNUM < = 1) END ELSE NULL VSL_MOVES VMS WHERE VMS. TRANS_ID = TAB. (T_ID), "-") DESTINATION

    DE)

    SELECT

    VM. TRANS_ID,

    VM. VCN_NO,

    VM. MOVEMENT_TYPE_CODE,

    (SELECT PNT. VSL_NAME OF PNTS WHERE NBV. DOC_NO = VM. VCN_NO AND ROWNUM < = 1) VESSEL_NAME;

    (SELECT C.COUNTRY_NAME OF COUNTRY C, VESSEL_MASTER M WHERE C.COUNTRY_CODE = M.FLAG AND M.VSL_CODE = VM. VSL_CODE AND ROWNUM < = 1) AS FLAG,.

    (SELECT M.VSL_IMO_NO FROM VESSEL_MASTER M WHERE M.VSL_CODE = VM. VSL_CODE AND ROWNUM < = 1) IMO_NO;

    TO_CHAR (VM. END_TIME, "DD/MM/YYYY HH24") ARRIVED_DATE,.

    WHEN VM BOX. MOVEMENT_TYPE_CODE = 'STA' THEN (SELECT P.PORT_NAME FROM RRS, PORT_MASTER P WHERE P.PORT_CODE = PNT. LST_PORT_CALL AND PNT. DOC_NO = VM. VCN_NO AND ROWNUM < = 1) WHEN VM. MOVEMENT_TYPE_CODE = 'UTA' THEN (SELECT VB. VSL_BERTH_UNBERTH VB BERTH_CODE WHERE VB. UNBERTH_TRANS_ID = VM. TRANS_ID AND ROWNUM < = 1) END F_ROM.

    --(SELECT T2.ID DELE DE CTE T1 JOIN CTE T2 SUR T1.) SNO = T2. SNO + 1 WHERE T1.ID = VM. TRANS_ID AND T1. NBV = VM. VCN_NO AND T2. NBV = VM. ATD VCN_NO)

    (SELECT T1.ID CTE T1 WHERE SNO = (SELECT T2. SNO + 1 ETC T2 WHERE T2.ID = VM. TRANS_ID AND T2. NBV = VM. T_ID VCN_NO))

    OF VSL_MOVES VM

    WHERE (VM. End_time > = TRUNC (TO_DATE (: pStartDate, ' dd/MM/yy HH24')) AND VM. End_time < = TRUNC (TO_DATE (: pEndDate, ' dd/MM/yy HH24')) or

    ((CASE WHEN VMS. MOVEMENT_TYPE_CODE = 'ATS' THEN (SELECT TO_CHAR (NBV. ATD, "DD/MM/YYYY HH24") OF PNTS WHERE NBV. DOC_NO = TAB. VCN_NO AND ROWNUM < = 1) WHEN VMS. MOVEMENT_TYPE_CODE = 'ATB' THEN (SELECT TO_CHAR (VBU. BRTH_ALL_FAST, "DD/MM/YYYY HH24") OF VSL_BERTH_UNBERTH VBU WHERE VBU. BERTH_TRANS_ID = VMS. TRANS_ID AND ROWNUM < = 1) END ELSE NULL VSL_MOVES VMS WHERE VMS. TRANS_ID = TAB. Saileddate T_ID)) > = TRUNC (TO_DATE (: pStartDate, ' dd/MM/yy HH24')) and

    (CASE WHEN VMS. MOVEMENT_TYPE_CODE = 'ATS' THEN (SELECT TO_CHAR (NBV. ATD, "DD/MM/YYYY HH24") OF PNTS WHERE NBV. DOC_NO = TAB. VCN_NO AND ROWNUM < = 1) WHEN VMS. MOVEMENT_TYPE_CODE = 'ATB' THEN (SELECT TO_CHAR (VBU. BRTH_ALL_FAST, "DD/MM/YYYY HH24") OF VSL_BERTH_UNBERTH VBU WHERE VBU. BERTH_TRANS_ID = VMS. TRANS_ID AND ROWNUM < = 1) END ELSE NULL VSL_MOVES VMS WHERE VMS. TRANS_ID = TAB. T_ID) saileddate) < = TRUNC (TO_DATE (: pEndDate, ' dd/MM/yy HH24')))

    --(Sailed_Date > = TRUNC (TO_DATE (: pStartDate, ' dd/MM/yy HH24 ')) AND Sailed_Date < = TRUNC (TO_DATE (: pEndDate, ' dd/MM/yy HH24')))

    AND VM. MOVEMENT_TYPE_CODE IN ('STA', "UTA")

    ) TAB

    now my Question is should I include Sailed date also starttime and endtime (ex: date range of pStartDate and pEndDate I need to display the date sailed respected records)

    I mean the problem is solved, I found the solution

    docks of pof-

    WITH CTE (SL, VCN_NO, VESSEL_NAME, FLAG, IMO_NO, ARRIVED, FROM_, MOVEMENT_TYPE_, NEXT_MOVE, SAILED_DATE, DESTINATION, FID, TID)

    AS

    (SELECT T1.*,

    WHEN T1 BOX. FROM_ = 'POF' THEN 1 OTHER 2 END FID,

    WHEN T1 BOX. DESTINATION = "POF" THEN 1 OTHER 2 END TID

    Of

    (

    SELECT ROW_NUMBER() OVER (PARTITION OF VM. VCN_NO ORDER BY VB. (SL BRTH_ALL_FAST),

    VM. VCN_NO,

    (SELECT M.VSL_NAME FROM VESSEL_MASTER M WHERE M.VSL_CODE = VM. VESSEL_NAME VSL_CODE),

    (SELECT C.COUNTRY_NAME OF COUNTRY C, VESSEL_MASTER M WHERE C.COUNTRY_CODE = M.FLAG AND M.VSL_CODE = VM. VSL_CODE AND ROWNUM< =1="" )="" as="">

    (SELECT M.VSL_IMO_NO FROM VESSEL_MASTER M WHERE M.VSL_CODE = VM. IMO_NO VSL_CODE),

    VB. BRTH_ALL_FAST HAS ARRIVED,

    (CASE WHEN VM. MOVEMENT_TYPE_CODE = 'ATB' THEN 'ANCHORAGE' WHAT VM. MOVEMENT_TYPE_CODE = "LTB" THEN 'LAND' WHEN VM. MOVEMENT_TYPE_CODE = "BTB" AND (SELECT TT1. VSL_MOVES TT, VSL_BERTH_UNBERTH TT1 BERTH_CODE WHERE TT. TRANS_ID = TT1. BERTH_TRANS_ID AND TT. VCN_NO = VM. VCN_NO AND TT1. UNBERTH_TRANS_ID = VB. BERTH_TRANS_ID) (SELECT WB. BERTH_MASTER BM BERTH_CODE WHERE BM. QUAY_CODE NOT IN ("VOPAK", "SPM")) THEN 'POF' WHEN VM. MOVEMENT_TYPE_CODE = "BTB" AND (SELECT TT1. VSL_MOVES TT, VSL_BERTH_UNBERTH TT1 BERTH_CODE WHERE TT. TRANS_ID = TT1. BERTH_TRANS_ID AND TT. VCN_NO = VM. VCN_NO AND TT1. UNBERTH_TRANS_ID = VB. BERTH_TRANS_ID) (SELECT WB. BERTH_MASTER BM BERTH_CODE WHERE BM. QUAY_CODE IN ("VOPAK", "SPM")) THEN "VOPAK" OTHER (SELECT P.PORT_NAME FROM RRS, P PORT_MASTER WHERE P.PORT_CODE = PNT. LST_PORT_CALL AND PNT. DOC_NO = VM. FROM_ VCN_NO END)).

    VM. MOVEMENT_TYPE_CODE,

    (SELECT THE VIRTUAL COMPUTERS. VSL_MOVES VMS MOVEMENT_TYPE_CODE WHERE VMS. TRANS_ID = VB. NEXT_MOVE UNBERTH_TRANS_ID),

    VB. UB_LST_LNE_CASTOFF SAILED_DATE,

    NVL ((SELECT CASE WHEN VMS. MOVEMENT_TYPE_CODE = 'UTA' THEN 'ANCHORAGE' WHAT VMS. MOVEMENT_TYPE_CODE = 'BTL' THEN 'LAND' WHEN VMS. MOVEMENT_TYPE_CODE = "UTS" THEN (SELECT P.PORT_NAME FROM RRS, PORT_MASTER P WHERE P.PORT_CODE = PNT. VSL_NXT_PRT_CALL AND PNT. DOC_NO = VMS. VCN_NO) WHEN VMS. MOVEMENT_TYPE_CODE = "BTB" AND (SELECT TT1. VSL_MOVES TT, VSL_BERTH_UNBERTH TT1 BERTH_CODE WHERE TT. TRANS_ID = TT1. BERTH_TRANS_ID AND TT. VCN_NO = VM. VCN_NO AND TT1. BERTH_TRANS_ID = VMS. TRANS_ID) (SELECT WB. BERTH_MASTER BM BERTH_CODE WHERE BM. QUAY_CODE NOT IN ("VOPAK", "SPM")) THEN 'POF' WHEN VMS. MOVEMENT_TYPE_CODE = "BTB" AND (SELECT TT1. VSL_MOVES TT, VSL_BERTH_UNBERTH TT1 BERTH_CODE WHERE TT. TRANS_ID = TT1. BERTH_TRANS_ID AND TT. VCN_NO = VM. VCN_NO AND TT1. BERTH_TRANS_ID = VMS. TRANS_ID) (SELECT WB. BERTH_MASTER BM BERTH_CODE WHERE BM. QUAY_CODE IN ("VOPAK", "SPM")) THEN "VOPAK" OTHERWISE NULL END VSL_MOVES VMS WHERE VB. UNBERTH_TRANS_ID = VMS. (TRANS_ID), "-") DESTINATION

    OF VM, VSL_BERTH_UNBERTH VB VSL_MOVES WHERE (VM. TRANS_ID = VB. BERTH_TRANS_ID)

    AND VM. MOVEMENT_TYPE_CODE LIKE '% TB '.

    AND ((VB. BRTH_ALL_FAST > = TO_TIMESTAMP(:pStartDate,'DD/MM/YYYY HH24:MI') AND VB. BRTH_ALL_FAST<= to_timestamp(:penddate,'dd/mm/yyyy="">

    OR (VB. UB_LST_LNE_CASTOFF > = TO_TIMESTAMP(:pStartDate,'DD/MM/YYYY HH24:MI') AND VB. UB_LST_LNE_CASTOFF<= to_timestamp(:penddate,'dd/mm/yyyy="" hh24:mi'))="">

    AND VB. BERTH_CODE (SELECT WB. BERTH_MASTER BM BERTH_CODE WHERE BM. QUAY_CODE NOT IN ("VOPAK", "SPM"))

    - AND VM. VCN_NO = 201510336

    ORDER OF VB. BRTH_ALL_FAST

    ) T1

    )

    Select rownum AS SNO, tab2.* of)

    SELECT

    TAB1. VCN_NO, TAB1. VESSEL_NAME, TAB1. FLAG, TAB1. IMO_NO,

    NVL (BOX WHEN TAB1. HAS ARRIVED< to_timestamp(:pstartdate,'dd/mm/yyyy="" hh24:mi')="" then="" '----------'="" else="" to_char(tab1.arrived,'dd/mm/yyyy="" hh24:mi')="" end,'----------')="">

    NVL (BOX WHEN TAB1. HAS ARRIVED< to_timestamp(:pstartdate,'dd/mm/yyyy="" hh24:mi')="" then="" '----------'="" else="" (select="" t2.from_="" from="" cte="" t2="" where="" t2.sl="TAB1.FROM_" and="" t2.vcn_no="TAB1.VCN_NO)" end,'----------'="">

    NVL (CASE WHEN (SELECT T2. DESTINATION OF THE CTE T2 WHERE T2.SL = TAB1. DEST AND T2. VCN_NO = TAB1. VCN_NO) = 'POF' THEN '-' ANOTHER BOX WHEN TAB1. SAILED_DATE > TO_TIMESTAMP (: pEndDate, ' DD/MM/YYYY HH24') THEN '-' ELSE TO_CHAR (TAB1. (SAILED_DATE, "DD/MM/YYYY HH24") A PIECE,'-') SAILED_DATE,.

    NVL (BOX WHEN TAB1. SAILED_DATE > TO_TIMESTAMP (: pEndDate, ' DD/MM/YYYY HH24') THEN '-' ELSE (SELECT CASE WHEN T2. DESTINATION = 'POF' THEN '-' ANOTHER T2. THE END OF THE DESTINATION OF THE CTE T2 WHERE T2.SL = TAB1. DEST AND T2. VCN_NO = TAB1. (END OF VCN_NO), "-") DESTINATION

    DE)

    SELECT THE TAB. VCN_NO, TAB. VESSEL_NAME, TAB. FLAG, TAB. IMO_NO,

    MIN (TAB. HAPPENED) ARRIVED,

    MIN (TAB.SL) FROM_,

    MAX (TAB. SAILED_DATE SAILED_DATE),

    MAX (TAB.SL) DEST,

    TAB. SNO

    DE)

    SELECT T1.*,

    WHEN T1 BOX. FID = 2 AND T1. TID = 1 THEN 1 WHEN T1. FID = 1 AND T1. TID = 2 THEN 1 WHEN T1. FID = 1 AND T1. TID = 1 THEN 0

    WHEN T1. FID = 2 AND T1. TID = ROWNUM THEN 2 + 1 END OF ANOTHER 3 SNO

    T1 ETC

    ) GROUP OF TABS BY TABS. VCN_NO, TAB. VESSEL_NAME, TAB. FLAG, TAB. IMO_NO, TAB. SNO

    ) TAB1 WHERE TAB1. SNO<>0

    ) tab2

  • get the return value of a method of the application module in the workflow

    Hello

    I use jdeveloper 11.1.1.7.0

    I defined a method (return type is useful java card) in the Module of the Application and add this method to the client interface.

    also I have a workflow and in this TF firstly I should execute this method and put the return value for the pageFlowScope parameter. I know that to use this method as a methodCall and set it as an activity by default, but I don't know how to get the return value before entering the jsff page and set the pageFlowScope parameter.

    Habib

    Concerning

    When you add the activity to the way to deal, there are 'Return value' property that you can set to #{pageFlowScope.yourVariable}

    Dario

Maybe you are looking for

  • HP M7246N Media Drive Bay Center

    I have a HP M7246N Media Center Tower, when I insert a HP Personal Media Drive in the Bay, the meter turns, I do not see that the drive listed with others my computer staff media USB keys. Where you see the player. I have to do something. I bought br

  • Phase problem

    I'm using LabVIEW 7.1 and windows 2000 I'm trying to measure the difference in phase between the 2 signals. The results I get are from 0 to 360. Below zero, it reads - 360. Is there a way to get the results of-180 to 180 degrees? the VI I use as well

  • string attribute connection not valid on SQL Server 2005 systems remote simulateously

    We run MS - SQL Server 2005 on a Dell server with Windows Server 2008 and with remote systems with XP. Frequently on remote systems, in error - no valid Attribte of chain of connection, then you connect the re, ote system this work about half an hour

  • CPU is poorly reported in systeminfo under Windows Vista SP2

    My new Intel 990 X Extreme Edition CPU is poorly reported in systeminfo under Windows Vista SP2, how this can be solved? Thanks for your replies.

  • EasyCam GE PC Camera Webcam HO98064

    You will need to install the driver of my webcam (title) I'm now running Windows 7.  Before when it runs Windows XP.  I can run on 64-bit or 32-bit.  All the ideas you would be grateful