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

Tags: Database

Similar Questions

  • How to get the result of the query?

    I'm looking to get output something like this...

    If a profile exists on the Pb, I need Exists in the colum

    PROFILE_A EXISTS

    PROFILE_B DOES NOT EXIST

    PROFILE_C EXISTS

    Select distinct profile

    decode (profile, "PASSWORD_PROFILE", "EXISTS", 'THERE is NO') 'STATUS '.

    of dba_profiles;

    How to get the above result? Anyone?

    In the first query, you can add any profile you want to check, and then try the below

    WITH qry1 AS (SELECT profile 'PROFILE_A' FROM dual

    UNION ALL

    SELECT "PROFILE_B" FROM double

    UNION ALL

    SELECT 'DEFAULT' double)

    SELECT the profile

    CASE WHEN EXISTS (SELECT 1 FROM dba_profiles dp

    WHERE dp.profile = q1.profile)

    THEN "EXISTS."

    OTHERWISE "NOT EXIST".

    The END as status

    OF qry1 q1;

    OUTPUT:-

    -------------

    SQL > WITH qry1 AS (SELECT profile 'PROFILE_A' FROM dual

    2. ANY TRADE UNION

    3. SELECT 'PROFILE_B' FROM dual

    4 UNION ALL

    5. SELECT 'DEFAULT' double)

    6. SELECT profile,

    7 CASE WHEN EXISTS (SELECT 1 FROM dba_profiles dp

    8 WHERE dp.profile = q1.profile)

    9 THEN 'EXISTS '.

    10. OTHERWISE "NOT EXIST".

    11 FINISSENT AS status

    Qry1 q1 12;

    PROFILE STATUS

    --------- ----------

    PROFILE_A DOES NOT EXIST

    PROFILE_B DOES NOT EXIST

    DEFAULT VALUE IS

  • How to get the results of the UK instead of the default USA?

    I live in the United Kingdom and would like to be able to search for UK results. for example, Amazon UK results when I search a product, etc.
    with the option of a search in the world so I don't get the results I want

    To add plugins to search for sites such as Amazon.co.UK and Google.co.uk to Firefox, open this page in Firefox and then search or click the sites that interest you: http://mycroft.mozdev.org/

    When you click on one of the listed search plugins, Firefox will ask you if you want to install it.

    After that, you can open the Firefox Add-ons Manager and click on disable one of the search engine integrated you want to use.

  • How to get the result of the test of CVI DLLs in teststand!

    I write a driver dll to test a source, I want to get the tension of world SERVERS (the instrument of the RS) and I used to call DLLs that written by CVI, teststand

    My question is what is the best way I can get the result of the test and show the user to teststand. the code below is fair? When I used to call this dll document, teststand

    "" I just get the result by setting in TS.this is a good meathod, and what should you do in teststand, I put the "outputVoltageV" point to an object?

    /*===========================================================================*/
    / * Function: read voltage/current output * /.
    / * End: this function returns the output and actual output voltage * /.
    / * current instrument.                                      */
    /*===========================================================================*/
    ViStatus _VI_FUNC rsngsm_datReadOutput (ViSession instrSession,
    ViPReal64 outputVoltageV, ViPReal64 outputCurrentA, ViPBoolean statusPeakCurrent)
    {
    ViStatus rsngsm_status = VI_SUCCESS;
    Bruno buf [BUFFER_SIZE];
    ViInt32 retCnt;
       
    FMT (buf, "%s<>
    If ((rsngsm_status = viWrite (instrSession, buf, NumFmtdBytes (), & retCnt))<>
    Return rsngsm_status;
           
    If ((rsngsm_status = viRead (instrSession, buf, 50, & retCnt))<>
    Return rsngsm_status;
    If (Scan (buf, "%s > %f [p2];")) %f [p2]; %i [b2] ", outputVoltageV, outputCurrentA, statusPeakCurrent). = 3)
    Return rsngsm_status;
           
    Return rsngsm_status;
    }

    sean_tan,

    Yes, you just pass a value of digital TestStand (e.g.; locals.number).

    If you use the adapter of the ICB, it might make more sense that you can use the Flexible DLL adapter for this type of function, that you do not use the standard settings of tTestData and tTestError. While TestStand will correctly recognize the function prototype, you want to make sure you that include the type library of your function Panel (you will need to create one if you have not already done so) in settings target of LabWindows / CVI-> type library.

    I hope this helps.

    -Jack

  • How to optimize the performance of this query SQL

    Hello

    I need to find the age for each day, but I need for all previous dates in a single query. So I used the following query:

    Select trunc (sysdate) - level + 1 DATE

    trunc (sysdate) - level + 1 - created_date AGE

    elements

    connect by trunc (sysdate) - level + 1 - created_date > 0

    I get output (FOR the DATE and AGE) that is fine and correct:

    DATE AGE           

    --------- ----------

    6 JULY 15 22

    5 JULY 15 21

    4 JULY 15 20

    3 JULY 15 19

    2 JULY 15 18

    JULY 1, 15 17

    JUNE 30, 15 16

    JUNE 29, 15 15

    JUNE 28, 15 14

    JUNE 27, 15 13

    JUNE 26, 15 12

    25 JUNE 15 11

    24 JUNE 15 10

    Now I need to calculate the average age for each day and I added the average in the following query:

    Select trunc (sysdate) - level + 1 DATE .

    AVG (trunc (sysdate) - level + 1 - created_date) AVERAGE_AGE

    elements

    connect by trunc (sysdate) - level + 1 - created_date > 0

    Group of trunc (sysdate) - level + 1


    This query is correct? When I add the aggregate (avg) function to this query, it takes 1 hour to retrieve the data. When I remove the average request function that gives the result in 2 seconds? What is the solution to calculate the average without affecting performance? Help, please

    Maybe you are looking for something like this...

    SQL > ed
    A written file afiedt.buf

    1 with t (point, created_date) :)
    2 Select 1, date '' 2015-06-24 from all the double union
    3 select 2, date ' 2015-06-29 the Union double all the
    4 Select 3, date ' 2015-06-17' of the double
    5        )
    6  --
    7. end of test data
    8  --
    9. Select item
    10, trunc (sysdate) - level + 1 as dt
    11, trunc (sysdate) - level + 1-created_date age
    12, round (avg (trunc (sysdate) - level + 1 - created_date) on (trunc (sysdate) partition - level + 1), 2) as avg_in_day
    13 t
    14 connect by level<=>
    15-point point = prior
    sys_guid() 16 and prior is not null
    17 * order by 1.2
    SQL > /.
    POINT DT AGE AVG_IN_DAY
    ---------- ----------- ---------- ----------
    1 JUNE 24, 2015 0 3.5
    1 25 JUNE 2015 1 4.5
    1 26 JUNE 2015 2 5.5
    1 27 JUNE 2015 3 6.5
    1 28 JUNE 2015 4 7.5
    1 29 JUNE 2015 5 5.67


    1 30 JUNE 2015 6 6.67
    1 1 JULY 2015 7 7.67
    1-2 JULY 2015 8 8.67
    1-3 JULY 2015 9 9.67
    1 TO 4 JULY 2015 10 10.67
    1 5 JULY 2015 11 11.67
    1 6 JULY 2015 12 12.67
    2 JUNE 29, 2015 5.67 0
    2 30 JUNE 2015 1 6.67
    2 1 JULY 2015 2 7,67
    2 2 JULY 2015 3 8.67
    2-3 JULY 2015 4 9.67
    2-4 JULY 2015 5 10.67
    2-5 JULY 2015 6 11.67
    2-6 JULY 2015 7 12.67
    3 JUNE 17, 2015 0 0
    3 18 JUNE 2015 1 1
    3 19 JUNE 2015 2 2
    3 20 JUNE 2015 3 3
    3 21 JUNE 2015 4 4
    3 22 JUNE 2015 5 5
    3 23 JUNE 2015 6 6
    3 24 JUNE 2015 7 3.5
    3 25 JUNE 2015 8 4.5
    3 26 JUNE 2015 9 5.5
    3 27 JUNE 2015 10 6.5
    3 28 JUNE 2015 11 7.5
    3 29 JUNE 2015 12 5.67
    3 30 JUNE 2015 13 6.67
    3 1 JULY 2015 14 7.67
    3 2 JULY 2015 15 8.67
    3 3 JULY 2015 16 9.67
    3-4 JULY 2015 17 10.67
    3-5 JULY 2015 18 11.67
    3 6 JULY 2015 19 12.67

    41 selected lines.

  • How to display the values of this query? The type is XDB. XDB$ STRING_LIST_T

    Hi all

    If I run this query using a tool like developer PL/SQL (SQL window), the values are displayed as a Collection. Just click and see the results of the al.

    Select
    dbms_resconfig.getRepositoryResConfigPaths)
    Of
    Double;


    I want to know how to display these values using any tool of sqlplus (with dbms_output or something like that).

    How can I do? With the help of the table? Create a type?

    TKS

    user12083350 wrote:

    I want to know how to display these values using any tool of sqlplus (with dbms_output or something like that).

    SQL> select * from table(dbms_resconfig.getRepositoryResConfigPaths())
      2  /
    
    COLUMN_VALUE
    --------------------------------------------------------------------------------
    /sys/xs/userrc.xml
    /sys/xs/rolesetrc.xml
    /sys/xs/drolerc.xml
    /sys/xs/rolerc.xml
    /sys/xs/frolerc.xml
    /sys/xs/xdserc.xml
    /sys/xs/scrc.xml
    
    7 rows selected.
    
    SQL> 
    

    And in PL/SQL:

    SQL> declare
      2      v_list xdb$string_list_t := dbms_resconfig.getRepositoryResConfigPaths();
      3  begin
      4      for i in 1..v_list.count loop
      5        dbms_output.put_line(v_list(i));
      6      end loop;
      7  end;
      8  /
    /sys/xs/userrc.xml
    /sys/xs/rolesetrc.xml
    /sys/xs/drolerc.xml
    /sys/xs/rolerc.xml
    /sys/xs/frolerc.xml
    /sys/xs/xdserc.xml
    /sys/xs/scrc.xml
    
    PL/SQL procedure successfully completed.
    
    SQL> 
    

    SY.

    Published by: Solomon Yakobson, April 24, 2010 15:04

  • How to get the result

    Hi all

    Let me explain my requirment.

    I created a custom workflow where the order goes to the approver for counterpart he can accept or reject that.

    If the notification that the approver receives have a result with approve and reject values. The notification activity, I've written a procedure that will update the database columns that are based on the result.

    But how do we get this result value

    I need something like below

    x_result: result of get value =
    If x_result = "Approve" then
    Update of table with approved status
    on the other
    Update of table with the status rejected

    Kind regards
    Kumar.

    Use the RESULT attribute

    x_result: = Wf_Notification.GetAttrText (, 'RESULT');

  • How to get the nodename using GetVersionEx

    My current code uses call unix ' uname ' to get the "struct utsname" nodename string. " I want to replace this call with equivalent windows. I discovered GetVersionEx in windows, but it does not give me the string nodename. Can anyone suggest me the replacement of exact windows for uname.

    Hello

    The question you posted would be better suited in the MSDN Forums. I would recommend posting your query in the MSDN Forums

    Link to the MSDN Forums is provided below.

    http://social.msdn.Microsoft.com/forums/en-us/categories

  • How to get the path (using &lt; input type = "file" / &gt;)

    Hello world

    I create a HTML form that has an entry of type = "file".  This will give you a dialog box browse for your user to search for a file on the operating system.

    And my code:

    function handleFileSelectForMyShop (evt)
    {
    var blnFileReaderSupported = false;

    Try
    {

    Debug.log ("handleFileSelect", "start handleFileSelect");
    reader of var = new FileReader();
    blnFileReaderSupported = true;
    var files = evt.target.files;
    var size = files.length;

    Debug.log ("handleFileSelect", "handleFileSelect # selected files:" + size, debug.info);

    for (var i = 0; i)< size;="">
    {
    Debug.log ("handleFileSelect", "in the handleFileSelect analysis the index file" + i, debug.info ");
    var f = files [i];
    Reader.OnLoad = (function (theFile)
    {
    Debug.log ("handleFileSelect", "start reader.onload", debug.info);
    return Function
    {
    Debug.log ("handleFileSelect", "start Function", debug.info);

    Debug.log ("handleFileSelect", "reading file" + theFile.name + "(" + theFile.size + "") "" + theFile.type, debug.info);

    If (theFile.type.match ('image.*')) {}
    var path = e.target.result;
    alert (path);
    create the path

    } else {}
    jAlert ("Please select photo!', 'Error'");
    }
    };
    })(f);

    If ((f.type.match ('image.*')) |) (f.type.match ('audio.*')) | (f.type.match ('video.*')))
    {
    Debug.log ("handleFileSelect", "in handleFileSelect call reader.readAsDataURL for type" + f.type, debug.info);
    Read in the media file in the form of a data URL.
    reader.readAsDataURL (f);
    }
    }

    Debug.log ("handleFileSelect", "Complete", debug.info);
    }
    {} catch (e)
    Debug.log ("handleFileSelect", e, debug.exception);
    If (! blnFileReaderSupported)
    {
    Alert('Error.) The FileReader API is not supported. ") ;
    }
    }
    }

    function doPageLoad()
    {
    Try
    {
    ELE var = document.getElementById ('txtFile_staffInfo');
    If (ele)
    {
    ele.addEventListener ('change', handleFileSelectForMyShop, false);
    }
    imgSelectPictureClick = 0;
    }
    {} catch (e)
    Debug.log ("doPageLoad", e, debug.exception);
    }
    }

    window.addEventListener ("load", doPageLoad, false);

    Note: And alert (path) leads to a Base64 string! It is not a path of the image that I browse a Spain file on the operating system.

    I want to have a full path of the file. For example: file:///accounts/1000/appdata/WebWorksAppTemplate.testa3NBcHBUZW1wbGF0ZSAgICA/shared/camera/image01.jpg

    I hope to see your reply soon!

    Thank you and best regards,

    A Pham

    A Pham

    I think that you can not get the absolute path of a file due to browser security, when you use the

    It's something that you need probably a PlayBook extension for.

  • How to get the result of the assessment?

    According to Adobe Captivate online help, "use the assessment mode when you want to test how the user has understood a procedure. You can set a score for every correct click. "

    But how the person who makes the assessment of the result (score/percentage) GET?

    Go to the Quiz settings and select the option to show the Score at the end of the Quiz.

    A new Quiz results slide is added at the end of your quiz so that learners can see their quiz results.

  • Not sure how to get the result that I need.

    Hi all

    I'm not a very good programmer, but I'm learning so please bear with me.

    My problem is that I need to be able to create a page that we can imput two dates and get all the items in our database which are equal or between imputted dates and be sent to the page.

    The part of sql is not my problem, but I'm not sure on how to create the page with in the date boxes.

    As it is now I have created the page, but it is retreving all elements of my table and comes it a grid of smiple and the output how many entries table for this is manageable.

    So, if someone can help me or point me in the right direction that would be great.

    Thnaks

    Pat

    Basis of a form.

    Basis of a SQL clause

    
      SELECT aField,bField,cField
      FROM aTable
      WHERE aDateField BETWEEN
               AND
              
    
    

    There is much for you to learn and understand to make a function and a business page.  But you should get at least close to return results.

  • How to get the result of a single line in several columns

    I have a scenario where I asked five different columns in a table and it would still look back one line.

    So, for example: the query would be
     Select user1, user2, user3, user4 from table1 where tblkey= 2 
    So, this would mean 1 row with the value of their respective areas.

    In my code, I have a common function I can call to send an email to the list of people (User1, User2, user3, user4).

    So rather than call this function each time for each user, is there a way I can display the output to 4 different rows and use the loop For to call this function only once.

    In this way, the loop For running 4 times (if not nulls for all users) and call this function of e-mail.

    Really, I'd appreciate if someone could give me an idea of this scenario.

    Thank you
    AR

    If the number of columns is fixed you may be able to use this:

    SELECT  DECODE
            (
                    RN
            ,       1,USER1
            ,       2,USER2
            ,       3,USER3
            ,       4,USER4
            )       AS USERS
    FROM    TABLE1
    CROSS JOIN (SELECT ROWNUM RN FROM DUAL CONNECT BY ROWNUM <= 4)
    WHERE   TBLKEY = 2
    

    This UN-pivot results.

    Here's an example of it in action:

    SQL> CREATE TABLE TABLE1
      2  (
      3          TBLKEY  NUMBER
      4  ,       USER1   VARCHAR2(1)
      5  ,       USER2   VARCHAR2(1)
      6  ,       USER3   VARCHAR2(1)
      7  ,       USER4   VARCHAR2(1)
      8  );
    
    Table created.
    
    SQL> INSERT INTO TABLE1
      2  SELECT  ROWNUM
      3  ,       SUBSTR(OBJECT_NAME,1,1)
      4  ,       SUBSTR(OBJECT_NAME,2,1)
      5  ,       SUBSTR(OBJECT_NAME,3,1)
      6  ,       SUBSTR(OBJECT_NAME,4,1)
      7  FROM    ALL_OBJECTS
      8  WHERE ROWNUM <= 10;
    
    10 rows created.
    
    SQL> SELECT * FROM TABLE1 WHERE TBLKEY = 2;
    
                  TBLKEY USER1      USER2      USER3      USER4
    -------------------- ---------- ---------- ---------- ----------
                       2 I          _          U          S
    
    SQL> SELECT  DECODE
      2          (
      3                  RN
      4          ,       1,USER1
      5          ,       2,USER2
      6          ,       3,USER3
      7          ,       4,USER4
      8          )       AS USERS
      9  FROM    TABLE1
     10  CROSS JOIN (SELECT ROWNUM RN FROM DUAL CONNECT BY ROWNUM <= 4)
     11  WHERE   TBLKEY = 2
     12  /
    
    USERS
    -------------------------
    I
    _
    U
    S
    

    HTH!

    Published by: Centinul on February 24, 2010 11:21

  • 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>
    
  • How to get the result of these data

    Hi all

    I have a following data. And I need the output as follows.

    If one of the Intr_num is missing so I need the output to be formatted the next row.

    I tried this using the row_number() but could not able to achieve the result. Is there any other function or analysis features to use.

    with t as 
    (
      select 10001 id, 5004 Intr_num from dual union all
      select 10002,5005 from dual union all
      select 10003,5006 from dual union all
      select 10004,5007 from dual union all
      select 10006,5009 from dual union all
      select 10007,5010 from dual union all
      select 10010,5013 from dual union all
      select 10011,5014 from dual union all
      select 10012,5015 from dual union all
      select 10013,5016 from dual union all
    )
    select * from t;
    
    OUTPUT:
    
    Intr_num
    5004 - 5007
    5009 - 5010
    5013 - 5016
    
    
    

    Kind regards

    SID

    Hello

    ROW_NUMBER is the right function to use:

    WITH got_dif AS

    (

    SELECT intr_num

    , intr_num - ROW_NUMBER () OVER (ORDER BY intr_num) AS dif

    T

    -WHERE... - If you need any filtering, put it here

    )

    SELECT MIN (intr_num) | ' - '

    || MAX (intr_num) AS intr_num_range

    OF got_dif

    GROUP BY dif

    ORDER BY dif

    ;

  • 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     
    

Maybe you are looking for