Sort records by using the approval date in HRMS

HII All

I have a table that displays the records after search
on the search page

now, I want to add a column over at the end of this table which shows the date of approval
This approval approved by a Director with different ID and password

How can I see the date of approval of the vacancy?


and I also want to show a drop down list with options ascending and descending
on this basis the column date of approval must be sorted

How can I achieve this?

Hello

If the display attributes are available in VO (responsible for display in the columns of the table) to the corresponding fields, you can

1.) create the areas through customization.
2.) extend the controller and order by condition dynamically in the PFR on the VO responsible to display the value in the columns of the table.
3.) something, you need to check if you are able to add the action event ppr on falling down during the creation of this area through customization, and even then set the ppr on this field in the PR of the extended controller method.

If the corresponding attributes are not available you must extend the VO (responsible for display in the columns of the table) too.
Thank you
Pratap

Tags: Oracle Applications

Similar Questions

  • Can I get the contacts and email from an old record without using the Migration Wizard?

    Can I recover Contacts and messaging of an old record without using the Migration Wizard? Disc of the user in question has been very corrupted with several programs having a weird behavior. Migration wizard migrated corrupt files, so, even a clean install with only migrated users gave rise to an unusable installation.

    I have now all own installed now, but need old email files and contacts. How can I transfer this information a copy of the old/bad drive and only this info?

    Yes. With the old drive mounted and available, open Mail and choose import mailboxes... from the file menu of mail. In the dialog box import data from , choose Apple Mail.

    Navigate to the Mail folder to the user of the old library drive. According to the version of courier used, you might see folders named V2 and / or V3. Choose the applicable folder, and then click Choose.

  • How to extract data using the xml data type

    Hello
    I tried the following example using the xml data type, but not the desired output.
    could you please correct the query in order to obtain the necessary
    CREATE TABLE TEST.EMP_DETAIL
    (
      EMPNO       NUMBER,
      ENAME       VARCHAR2(32 BYTE),
      EMPDETAILS  SYS.XMLTYPE
    )
    Insert into EMP_DETAIL
       (EMPNO, ENAME, EMPDETAILS)
     Values
       (7, 'Martin', XMLTYPE('<Dept>
      <Emp Empid="1">
        <EmpName>Kevin</EmpName>
        <Empno>50</Empno>
        <DOJ>20092008</DOJ>
        <Grade>E3</Grade>
        <Sal>3000</Sal>
      </Emp>
      <Emp Empid="2">
        <EmpName>Coster</EmpName>
        <Empno>60</Empno>
        <DOJ>01092008</DOJ>
        <Grade>E1</Grade>
        <Sal>1000</Sal>
      </Emp>
      <Emp Empid="3">
        <EmpName>Samuel</EmpName>
        <Empno>70</Empno>
        <DOJ>10052008</DOJ>
        <Grade>E2</Grade>
        <Sal>2530</Sal>
      </Emp>
      <Emp Empid="4">
        <EmpName>Dev</EmpName>
        <Empno>80</Empno>
        <DOJ>10032007</DOJ>
        <Grade>E2</Grade>
        <Sal>1200</Sal>
      </Emp>
    </Dept>
    '));
    I need to get the record for Empid = '2'
    Then tried the following query with no expected o/p
    SELECT a.empno,a.ename,a.empdetails.extract('//Dept/Emp/EmpName/text()').getStringVal() AS "EmpNAME",
         a.empdetails.extract('//Dept/Emp/Empno/text()').getStringVal() AS "EMPNumber",
          a.empdetails.extract('//Dept/Emp/DOJ/text()').getStringVal() AS "DOJ",
          a.empdetails.extract('//Dept/Emp/Grade/text()').getStringVal() AS "Grade",
          a.empdetails.extract('//Dept/Emp/Sal/text()').getStringVal() AS "Salary",
          a.empdetails.extract('//Dept/Emp[@Empid="2"]').getStringVal() AS "ID",
          a.empdetails.extract('//Dept/Emp[EmpName="Coster"]').getStringVal() AS "CHK"
         FROM emp_detail a 
         where empno=7  
               AND a.empdetails.existsNode('//Dept/Emp[@Empid="2"]') =1
    Thank you...

    Karthick_Arp wrote:
    I'm not very good at that... But if your XML code should not be more like this

    SQL> Insert into EMP_DETAIL
    2     (EMPNO, ENAME, EMPDETAILS)
    3   Values
    4     (7, 'Martin', XMLTYPE('
    5    
    6      1
    7      Kevin
    8      50
    9      20092008
    10      E3
    11      3000
    12    
    .. cut ..
    

    Why? It is perfectly valid to data as attributes rather than elements and also quite common for key values.

  • If I sell my iPhone 6, indicating the error 53, for parts, should I worry about the person buying it have some sort of access to the personal data registered on this phone?

    If I sell my iPhone 6, indicating the error 53, for parts, should I worry about the person buying it have some sort of access to the personal data registered on this phone?

    Hello error 53 matched a UN failure to the home button you had to replace the screen or the home button alone or outside apple store so if you replace the button man of origin and you restored the iPhone error will be fixed but if you sell the buyer has no access to the data of the iPhone

  • Cannot use the bb data components

    Hello, I am a newbie. I recently moved from QtQuick to Cascades, now I'm trying to do some simple applications to start. I want to use DataSource {point in my application. I imported bb.data 1.0 in the main of QML, added bb/data/source data file in the file c ++ main. But when I try to use the qml data source, it gives me the following error: 'value of the default property of 'controls' Type mismatch. Waiting for bb::cascades:Control and found the source of data. ».

    Can someone hepl?

    The question is do you have set the DataSource as the first element in the container, without putting it in the attachedObjects. The container has a 'default' property that is a list of type Control and DataSource is not a subclass of control. Verify the data source examples in the docs and it should show how to use there... inside an attachedObjects: list [].

  • Good way to use the concurrent data store

    Hello

    I'm developing a multithreaded C++ application that uses the C++ of Berkeley DB Library.

    In my case, I have several databases that I composed in a wooded area. It is important for me to use an environment because I need control over the cachesize parameter.

    I don't need no guarantee of transaction and have for most of the readings, so I decided to use the "simultaneous database.

    I first pre-fill all databases with a number of entries (configuration single-threaded phase) and then work on it at the same time (for most readings, but also insertions and deletions).

    I tried all kinds of different configurations, but I can't work without specifying DB_THREAD as a flag of the environment.

    I don't want to because then access all handles is synchronized sequentially according to the documentation:

    "... Note that the activation of this indicator will serialize calls to DB using the handle between the threads. If

    simultaneous scaling is important for your application, we recommend handles separate for each thread opening

    (and do not specify this indicator), rather than share handles between threads. "

    (Berkeley DB QAnywhere C++)

    So I tried to open the environment with the following indicators:

    DB_CREATE | DB_PRIVATE | DB_INIT_MPOOL | DB_INIT_CDB

    All data in this environment handles are open only with the DB_CREATE flag.

    So, since my understanding this same basic access handles need to be synchronized, I opened separate handles foreach database for each thread (opening the handles is still single-threaded).

    In my first approach, I have only made use of the object of global environment. Which does not work and gives the following during operations error message:

    DB_LOCK-> lock_put: Lock is no longer valid

    So I thought, since the same handle global env is passed to all handles separate DB, it is perhaps a race condition critical on the handful of approx.

    So in my next test, I opened also handles separate EPS in each thread (and db handles owned each).

    That does not produce an error in db, but now it seems that each thread sees its own version of the databases (I call it stat early in the life of each thread and he sees all of the empty dbs).

    What is the right way to use the concurrent data store? Each thread should really open his own set of db handles? What about the number of open handles env?

    PS: Without specifying that the DB_PRIVATE flag seems to do the job, but for performance reasons, I want all operations to perform in the cache and do not specify product DB_PRIVATE average of several writes to the disk for my scenario.

    Thanks a lot for your help.

    CD (simultaneous database) allows a single editor with multiple drives, access to the db at a given point in time.    The handle for the writer doesn't have to be shared with readers.   If you share the DB handle then calls are synchronized, but if each thread has its own handle DB then this is not the case.     Since you have an environment, DB_THREAD must be at the level of the environment.   This will allow the sharing of the environment handle.     This type of error "DB_LOCK-> lock_put: Lock is no longer valid" you can provide us your code so we can take a look.   Also what BDB version are you using?

  • What value for p_print_server when you use the Rest Data Services as a print server?

    Hello

    I have my report server on the internal workspace defined as BI Publisher URL as default... It works for my BI Publisher reports.

    I have 2 reports who need to use the rest Data Services FOP engine and use GET_PRINT_DOCUMENT function Signature 4

    https://docs.Oracle.com/CD/E59726_01/doc.50/e39149/apex_util.htm#AEAPI146

    For these 2 reports, I need to pass a parameter to p_print_server. The documentation describes this as the URL for the print server

    My question is, how to find the URL for p_print_server when I want to use the rest Data Services FOP on ADR?

    I can not put as NULL as at the time, it will use the default BI Publisher URL and then these 2 reports will not work

    Moreover, when I put the server reports on internal workspace as 'Rest Data Services', my two reports work fine, but not when I put is as URL BI Publisher - which is necessary

    Help, please

    Concerning

    Matt

    Hi Matt Mulvaney,

    Matt Mulvaney says:

    I already have the correct configuration to be able to produce reports FOP including two steps you mentioned. This set works very well when I put the "Print server" preference in the settings of APEX Data Services Instance remains - and reports can be produced. But as I said, this must be set to a URL of BI Publisher.

    If you use "Print server" as "Oracle BI Publisher" then the p_print_server parameter would have been:

    http://myserver.mydomain.com:8888/xmlpserver/convert

    Where:

    • Printing of the address of the host server: myserver.mydomain.com (you can also use the IP address)
    • Print Server Port: 8888 (depending on what your BI Publisher Server uses port)
    • Print server script: / xmlpserver/convert

    Similarly, if you choose "Print server" as 'Oracle REST Data Services', the instance settings don't ask questions on the print settings, but internally it uses the following parameters and the p_print_server parameter is:

    http://myserver.mydomain.com:8080 / ADR / _ / fop2pdf

    Where:

    • Printing of the address of the host server: myserver.mydomain.com (host computer on which ADR is hosted)
    • Print Server Port: 8080 (the port used by what ADR/APEX Forum)
    • Script of the print server: / ords / _ / fop2pdf (this is not disclosed by APEX/ADR documentation, but as mentioned by Marc Sewtz in the following thread)

    Reference: Re: Apache FOP disappeared by Oracle APEX installable APEX 5.0 and 5.0.1 APEX

    Kind regards

    Kiran

  • How to post JSON using the Oracle Data Service remains

    I use the regular (not NoSQL or something) oracle database with oracle rest data service. Now I need to post data / put wrote in the body of the request using some json/xml format, how to consume them using the rest data service, searching inside the express application?  important: using pl/sql block

    Also, I am on,

    Data service Oracle rest 3.0

    Oracle Application Express 4.2

    Post edited by: Jacynthe

    OK, I got the answer. At the express request, there is a link called body variable (: body in BLOB). but the BLOB data type. So, we have to convert that in other data, type what we in pl/sql. I've converted data type witch CLOB supports json.

  • Y at - it a paper on how to use the map data the lookup value?

    I'm looking for a documentation where I could find information about the game of card data and how to use the map data configured according to look.

    Any help is very appreciated.

    I found a few threads on data cards:

    http://topliners.Eloqua.com/docs/doc-2434

    http://topliners.Eloqua.com/docs/doc-2817

    http://topliners.Eloqua.com/message/14058#14058

    Maybe that can help you get started

  • Using the default date for a variable presentation

    In the report, I want to use the default date of the variable presentation.
    If I use the query as below, default is correctly.but if I pass the dash prompt date value that is throwing error

    Someone help me change the below
    request for valid results?

    TIMESTAMPADD (SQL_TSI_day, (dayofmonth(date @{asdf}{date '1900-01-01'}) *-1) + 1, date @{asdf} {date ' 1900-01-01'})

    Published by: user12255470 on December 2, 2010 12:11

    Published by: user12255470 on December 2, 2010 12:12

    Try this:
    TIMESTAMPADD (SQL_TSI_day, (dayofmonth(date '@{asdf}{1900-01-01}') *-1) + 1, date ' @{asdf} {1900-01-01} "")

    Mark answers quickly.

    J
    -bifacts
    http://www.obinotes.com

    Published by: bifacts on December 2, 2010 15:21

  • Impact on performance when you use the LONG data type

    Hi all


    Only I have a doubt about the use of LONG data type

    I use the data type LONG for some columns in a table and I created indexes on the columns separately, but these column values can be easily fit into the varchar data type.

    (Just to see the performance on this issue)

    Suppose that a common select query with WHERE condition on any of the column which has LONG data type will affect the performance of the query?

    Please explain.

    Thank you

    (1) the LONG (and LONG RAW) data types have been depricated for quite a while. Oracle has been strongly recommends that you move to 8.1.5 CLOB and BLOB data types. Why you use the LONG data type? You're still on Oracle 7?

    (2) have you tried to write a query that has a WHERE condition that refers to a LONG column? In general, you can not because it does not support the type of data LONG. For example

    SQL> ed
    Wrote file afiedt.buf
    
      1  create table a (
      2    col1 varchar2(30),
      3    col2 long
      4* )
    SQL> /
    
    Table created.
    
    SQL> select * from a where col2='abc';
    select * from a where col2='abc'
                          *
    ERROR at line 1:
    ORA-00997: illegal use of LONG datatype
    

    LONG data types are a royal pain to work with. They also have implications on the performance of wicked on the client.

    Justin

  • use the cyclic data record

    Hello

    Before you begin, let me briefly introduce what I the material and what I want to achieve.

    I got the chassis SCXI-1000 (chassis), SCXI - 1102C (module), SCXI-1303 (terminal block,

    mainly for the entry of temperature sensor); A few months ago I bought crossed SCXI-1180 and SCXI-1302 terminal to my digital input signal (see attached PNG file). In fact, I have two digital signals at the entrance. The first digital signal (enter as PFI0) Injection that will trigger the start of the recording is my

    Temperature profile; The second is entry signal (such as PFI1), that I want to use as a trigger of reference to stop recording and save the wrapping cycle.

    And then the injection cycle keeps going. Please see the attached VI for more details.

    I get my digital triggering working to start recording my profile of temperature sensor. However, I can not get the second part trigger to stop recording.

    The error of the execution of my VI, is a trigger of reference applies to finishes of sampling. It seems I need continuously to record my temperature profile sampling! Thus, by browsing my VI, please give some suggestions for the task and solutions to solve the conflictions for sampling.

    Your help is highly appreciated.

    HW


  • Channels for the identification of the records by using the syntax for Connect By

    Hello

    Can someone help with the following problem please?

    Our database records evaluations of the child for families in difficulty. When get us in touch with them, ideallu:
    A child receives a preliminary assessment (evaluation).
    If they are deemed to have need for additional support, they are given a second assessment (B) that is triggered by the assessment and an ID of the trigger to identify what assessment he comes.
    If they are deemed to need further support, they are given a third evaluation (C) that is triggered by the 2 assessment and an ID of the trigger to show that it comes from the b. assessment
    This is also true for a fourth assessment (assessment) report that is triggered by the evaluation C.

    However, due to the poor implementation of this concept by our provider database and the lack of knowledge by the workers, we have 2 problems:

    (1) analysis has isn't always the starting point as a worker can start any assessment at any time, i.e. from c assessment.

    (2) in view of this, a child can have several evaluations of the same type, i.e. a x 3 C, 2 x B assessment assessment in no particular order.

    The problem:

    I need to identify the separate strings (desired_output) of intervention using the relationship between the registration ID and the ID of the trigger, as shown in the table below:
    CHILD_ID RECORD_ID TRIGGER_ID ASM_NAME REC_START_DATE            REC_END_DATE              DESIRED_OUTPUT         
    -------- --------- ---------- -------- ------------------------- ------------------------- ---------------------- 
    A00001   R297931              B        18-JUN-10                 18-JUN-10                 1                      
    A00001   R299381   R297931    C        23-JUN-08                 23-JUN-08                 1                      
    A00001   R133219              A        12-AUG-08                 12-AUG-08                 2                      
    A00001   R240118              A        30-OCT-09                 30-OCT-09                 3                      
    A00001   R604913              A        17-AUG-12                 17-AUG-12                 4                      
    A00001   R604943   R604913    B        17-AUG-12                 17-AUG-12                 4                      
    A00001   R604961   R604943    C        17-AUG-12                 03-SEP-12                 4                      
    A00001   R605195              B        25-AUG-12                 25-AUG-12                 5                      
    A00001   R605214              A        28-AUG-12                 28-AUG-12                 6                      
    A00001   R609999   R604961    D        03-SEP-12                 05-SEP-12                 4                     
     
    Data:
    select * from
    (select * from
     
    (select 'A00001' as child_id, 'R297931' as record_id, null  as trigger_id, 'B' as asm_name, to_date('18-06-2010','dd/mm/yyyy') as rec_start_date, to_date('18-06-2010','dd/mm/yyyy') as rec_end_date, 1 as desired_output from dual) union all
    (select 'A00001' as child_id, 'R299381' as record_id, 'R297931' as trigger_id, 'C' as asm_name, to_date('23-06-2008','dd/mm/yyyy') as rec_start_date, to_date('23-06-2008','dd/mm/yyyy') as rec_end_date, 1 as desired_output from dual) union all
    (select 'A00001' as child_id, 'R133219' as record_id, null as trigger_id, 'A' as asm_name, to_date('12-08-2008','dd/mm/yyyy') as rec_start_date, to_date('12-08-2008','dd/mm/yyyy') as rec_end_date, 2 as desired_output from dual) union all
    (select 'A00001' as child_id, 'R240118' as record_id, null as trigger_id, 'A' as asm_name, to_date('30-10-2009','dd/mm/yyyy') as rec_start_date, to_date('30-10-2009','dd/mm/yyyy') as rec_end_date, 3 as desired_output from dual) union all
    (select 'A00001' as child_id, 'R604913' as record_id, null as trigger_id, 'A' as asm_name, to_date('17-08-2012','dd/mm/yyyy') as rec_start_date, to_date('17-08-2012','dd/mm/yyyy') as rec_end_date, 4 as desired_output from dual) union all
    (select 'A00001' as child_id, 'R604943' as record_id, 'R604913' as trigger_id, 'B' as asm_name, to_date('17-08-2012','dd/mm/yyyy') as rec_start_date, to_date('17-08-2012','dd/mm/yyyy') as rec_end_date, 4 as desired_output from dual) union all
    (select 'A00001' as child_id, 'R604961' as record_id, 'R604943' as trigger_id, 'C' as asm_name, to_date('17-08-2012','dd/mm/yyyy') as rec_start_date, to_date('03-09-2012','dd/mm/yyyy') as rec_end_date, 4 as desired_output from dual) union all
    (select 'A00001' as child_id, 'R605195' as record_id, null as trigger_id, 'B' as asm_name, to_date('25-08-2012','dd/mm/yyyy') as rec_start_date, to_date('25-08-2012','dd/mm/yyyy') as rec_end_date, 5 as desired_output from dual) union all
    (select 'A00001' as child_id, 'R605214' as record_id, null as trigger_id, 'A' as asm_name, to_date('28-08-2012','dd/mm/yyyy') as rec_start_date, to_date('28-08-2012','dd/mm/yyyy') as rec_end_date, 6 as desired_output from dual) union all
    (select 'A00001' as child_id, 'R609999' as record_id, 'R604961' as trigger_id, 'D' as asm_name, to_date('03-09-2012','dd/mm/yyyy') as rec_start_date, to_date('05-09-2012','dd/mm/yyyy') as rec_end_date, 4 as desired_output from dual)) child_records
    Originally, I thought to use Oracle Connect By syntax, but it does not (as far as I can work on!) because I have no start condition (the string of assessments can start A or B or C or D) which leads to duplication of lines.

    I thought I could use connect_by_root to group common assessments, but I am not convinced that this will give consistent results.

    -------------------------
    select
    child_records.*, 
    connect_by_root(nvl(trigger_id,record_id)) chain_id
    from child_records
    connect by trigger_id = prior record_id
    --------------------

    Is an alternative, possibly using trigger_id = above lag(record_id,1,null) (child_id order partition of...) but the assessments are in no particular order, I don't think I can specify a command clause...?

    Can anyone help to generate the desired output please?

    Thank you

    TP

    Hello

    Little Penguin says:
    ... However, due to the poor implementation of this concept by our provider database and the lack of knowledge by the workers, we have 2 problems:

    (1) analysis has isn't always the starting point as a worker can start any assessment at any time, i.e. from c assessment.

    (2) in view of this, a child can have several evaluations of the same type, i.e. a x 3 C, 2 x B assessment assessment in no particular order.

    This isn't necessarily a bad design. If it really fits your business rules is another matter. But as a means to represent events from cause to effect, to be used to CONNECT BY queries, it makes sense.

    The problem:

    I need to identify the separate strings (desired_output) of intervention using the relationship between the registration ID and the ID of the trigger, as shown in the table below:

    Let me assure you that I understand. You don't really have an desired_output column; you will need to that derived from other columns. Right?

    CHILD_ID RECORD_ID TRIGGER_ID ASM_NAME REC_START_DATE            REC_END_DATE              DESIRED_OUTPUT
    -------- --------- ---------- -------- ------------------------- ------------------------- ----------------------
    A00001   R297931              B        18-JUN-10                 18-JUN-10                 1
    A00001   R299381   R297931    C        23-JUN-08                 23-JUN-08                 1
    A00001   R133219              A        12-AUG-08                 12-AUG-08                 2
    A00001   R240118              A        30-OCT-09                 30-OCT-09                 3
    A00001   R604913              A        17-AUG-12                 17-AUG-12                 4
    A00001   R604943   R604913    B        17-AUG-12                 17-AUG-12                 4
    A00001   R604961   R604943    C        17-AUG-12                 03-SEP-12                 4
    A00001   R605195              B        25-AUG-12                 25-AUG-12                 5
    A00001   R605214              A        28-AUG-12                 28-AUG-12                 6
    A00001   R609999   R604961    D        03-SEP-12                 05-SEP-12                 4                     
    

    Data:...

    Thanks for the display of the data of the sample; that really helps.

    Originally, I thought to use Oracle Connect By syntax, but it does not (as far as I can work on!) because I have no start condition (the string of assessments can start A or B or C or D) which leads to duplication of lines.

    Is not

    START WITH  trigger_id  IS NULL
    

    identify a starting point? If something has not been triggered by something else, it is not a starting point? It is actually quite common in the hierarchical tables.

    I thought I could use connect_by_root to group common assessments, but I am not convinced that this will give consistent results.

    I'm not sure that you understand the problem. What do you mean by "consistent results? The doubt that you are worried, what exactly?

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

    select
    child_records.*,
    connect_by_root(nvl(trigger_id,record_id)) chain_id
    from child_records
    connect by trigger_id = prior record_id
    

    You got right. If I understand what you mean by consistent results, it will bring them. You want to START to condition, of course, and as the starting lines will never have a trigger_id, there is no need to tell

    CONNECT_BY_ROOT  NVL (trigger_id, record_id)   AS chain_id
    

    You can simply say

    CONNECT_BY_ROOT  record_id   AS chain_id
    

    This will be particularly well idnetify the strings of their record_ids. Looks like you want to assign new sequence numbers (1, 2, 3,...) to identify the channels. Which takes an extra step.

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

    Is an alternative, possibly using trigger_id = above lag(record_id,1,null) (child_id order partition of...) but the assessments are in no particular order, I don't think I can specify a command clause...?

    Right; LAG depends on the order and order tells us nothing to this problem.
    In fact, feeds means so little to this problem that an event can come before the event that triggered it.
    For example, if I understand the first two lines of your output

    CHILD_ID RECORD_ID TRIGGER_ID ASM_NAME REC_START_DATE            REC_END_DATE              DESIRED_OUTPUT
    -------- --------- ---------- -------- ------------------------- ------------------------- ----------------------
    A00001   R297931              B        18-JUN-10                 18-JUN-10                 1
    A00001   R299381   R297931    C        23-JUN-08                 23-JUN-08                 1                      
    

    C event was triggered by the event B, even if C took place two years before B.
    (Not that it is important for the SQL problem, but can you explain the logic of how events can come before or after the events that triggered them?) "I'm just curious.)

    Here's a way you can assign sequential numbers to identify the channels:

    WITH     got_d_num     AS
    (
         SELECT     c.*
         ,     ROW_NUMBER () OVER ( PARTITION BY  child_id     -- Just guessing
                                   ORDER BY          NVL2 ( trigger_id
                                                  , 2     -- rows with trigger_ids come 2nd
                                       , 1     -- rows without come 1st
                                       )
                             ,             rec_start_date
                             ,             asm_name
                           )      AS d_num
         FROM    child_records  c
    )
    SELECT     child_id, record_id, trigger_id, asm_name, rec_start_date, rec_end_date
    ,     desired_output               -- if needed
    ,     CONNECT_BY_ROOT d_num     AS chain_num
    FROM     got_d_num
    START WITH     trigger_id     IS NULL
    CONNECT BY     trigger_id     = PRIOR record_id
    ORDER BY  child_id
    ,            rec_start_date
    ,       asm_name
    ;
    

    Output:

    `                                              DESIRED
    CHILD_ RECORD_ TRIGGER A REC_START REC_END_D   _OUTPUT  CHAIN_NUM
    ------ ------- ------- - --------- --------- --------- ----------
    A00001 R299381 R297931 C 23-JUN-08 23-JUN-08         1          3
    A00001 R133219         A 12-AUG-08 12-AUG-08         2          1
    A00001 R240118         A 30-OCT-09 30-OCT-09         3          2
    A00001 R297931         B 18-JUN-10 18-JUN-10         1          3
    A00001 R604913         A 17-AUG-12 17-AUG-12         4          4
    A00001 R604943 R604913 B 17-AUG-12 17-AUG-12         4          4
    A00001 R604961 R604943 C 17-AUG-12 03-SEP-12         4          4
    A00001 R605195         B 25-AUG-12 25-AUG-12         5          5
    A00001 R605214         A 28-AUG-12 28-AUG-12         6          6
    A00001 R609999 R604961 D 03-SEP-12 05-SEP-12         4          4
    

    This example uses rec_start to affect chain_num and also sort the output, but not to determine wht in a string. The first 3 events untrigered (in rec_start order) have been in August 2008, October 2009 and June 2010, while they were assigned chain_nums 1, 2 and 3, in that order. Antyhting that was triggered by them, directly or indirectly, gets the same chain_num if it happened before or after the starting point of the chain. Thus, the first line of the output, in June 2008, gets chain_num = 3. You have assigned desired_output = 1 on this line. If you can explain how you got the number 1, we can probably find a way to code, so that the calculated chain_num is identical to desired_num. In the above query, they are not the same, but they are related. Everywhere you specified desired_output = 1, the above query produces chain_num = 3. If the numbers are the same (for example desired_output = 4 = chain_num) it's just a coincidence.

    Note that when I used ROW_NUMBER, I did in a subquery, not in the main query where the CONNECT BY were made. Never use the analytical functions (for example, ROW_NUMBER) in the same query with CONNECT BY. The analytical functions are often the cause CONNECT BY conditions to be incorrectly evuated. I have never seen any literature on this subject and it doesn't always happen, but I suggest that you avoid to mix everything well.

    Published by: Frank Kulash, Sep 15, 2012 10:00

    Published by: Frank Kulash, Sep 15, 2012 10:44

    I just read the answer from John, who has a nice illustration of my last point: use of the separate petitions for both analytical and CONNECT BY. You can use the analytic function first, and then CONNECT BY, as I did, or you can do the first CONNECT BY and then use the analytic function (in a solution of John DENSE_RANK) later. Whatever it is, you must separate them.

  • Record JPG with the wrong date

    When I save a PSD file, he recorded with the date and the current time today, but when I "save under" a JPG file, it's save my computer first started when I got it with the date and time. What happens to all THE jpg files. Ones I saved yesterday and today have the same date and time. (I started having to set the date and time in my file name!)

    I'm on Windows 10.

    Thanks in advance for any help!

    The screen 'Open' uses Windows Explorer, so it's definitely a Windows problem.

    Try this:

    On the title bar, just above the list of files/folders (Date, Type, size) right click on the empty part of the bar and look at the context menu.

    You should see a list of the types of possible columns, the checkmarks on the possible options. There are more than 15 available date types. Try to create another column with another date than the simple 'Date' type, you now by checking the box. See if other dates are displayed.

  • Use the Quick Date year section in the column header

    Version 11.1.1.7

    I have a dashboard command prompt which invites for a date.

    My analysis is filtered on this prompt.

    My data looks like this:

    Accounting_Date FY1_Data FY2_Data FY3_Data

    31 AUGUST 2014 200 300 400

    AUGUST 31, 2013 275 325 450

    My requirement is to display the exercise as the heading of column (as opposed to FY1_Data, FY2_Data, FY3_Data).

    FY1_Data is the year of the accounting Date - 2.

    FY2_Data is the year of the Date of accounting order - 1

    FY3_Data is the year of the accounting Date

    So, for the first record in my table example, the column headers must be (2012, FY2013, FY2014)

    For the second disc, the column headers must be (fiscal year 2011, 2012, FY2013).

    To do this, I have tried the following to the first column only:

    I put the column header to FY@{Year1}

    Then I put my dashboard accounting cut-off Date prompt to fill a variable presentation (ActPrdDt).

    Then I created another guest of 'Variable' dashboard with a year1 variable name.

    In this prompt, I used SQL results as the default selection:

    Select 'Date_Table '. "' Accounting_Date ' from 'MySubjectArea' where 'Date_Table '. "" Accounting_Date "= @{ActPrdDt}

    The problem is that the full date is displayed in the column header (AFA 08/31/2014).

    I tried to modify the sql statement in my second guest of dashboard for

    Select TO_CHAR ("Date_Table". "Accounting_Date", "YYYY")-2 of... "

    but the column header displays all values in the column, which is usually what it displays when there is an error in the sql statement.

    Is it possible to manipulate the sql statement to get only the year of the accounting Date and subtract 1 or 2 him?


    I changed the sql statement

    Of

    TO_CHAR ("Date_Table". "Accounting_Date", "YYYY")-2 "

    TO

    extract (year of "Date_Table". "Accounting_Date")-2 "

    This solved my problem.

Maybe you are looking for