No Column Header if 0 Child Records

Hi everybody,
I have one parent qry and other child qry. e.g. in scott/tiger Dept is parent and Emp is child. I have to print all employees for a department like
Dept 01 SALES
Employee Code Name
10283 BLAKE
2304 JOHN
I want that if there is no employee for 02 'MARKETING' department then the header for employee data should not be printed. Print should be only
Dept 02 MARKETING
I do not want to use thing like a flag or dummy column. Please let me know the solution
Regards
Mona

try this format trigger on the enclosing fram of headings or each heading.
function M_G_EMPNO_HDRFormatTrigger return boolean is
v_count number;
begin
select count(*) into v_count
from emp
where deptno=:deptno;
if v_count >0 then
     return (TRUE);
else
return (false);
end if;
end;
i try it work if you need this example report then mail me.
[email protected]

Similar Messages

  • Converting column header and a single record into rows

    Lets suppose the table with only one record
    col1 col2 col3-----Column Header
    d1 d2 d3
    i want it in following manner
    column_name Column_data----Column Header
    col1 d1
    col2 d2
    col3 d3
    for this i have written the query as
    select column_name,column_data from (select * from XXX where col1=123)
    MODEL RETURN UPDATED ROWS
    dimension by(col1)
    measures (col1,0 column_name,0 column_data )
    ignore nav
    rules ITERATE(167)
    column_name[iteration_number]=cast( iteration_number as varchar2(3)),
    column_data[iteration_number]=cast( iteration_number as int)
    here i am just assigning iteration_number but i want to assign name of the column and its value;
    Note:--table contains nearly 200 columns

    Something like (using one of my own tables):
    select column_name colname,
           decode(column_name,'RUN_NO',to_char(run_no),
                              'SEARCH_ID',to_char(search_id),
                              'PROCESSING_START_DATE',to_char(processing_start_date,'DDMMYYYYHH24MISS'),
                              'PROCESSING_END_DATE',to_char(processing_end_date,'DDMMYYYYHH24MISS'),
                              'NO_OF_MATCHES',to_char(no_of_matches),
                              'ERROR_DETAILS',error_details,
                              'ADVREP_TIMESTAMP',to_char(advrep_timestamp,'DDMMYYYYHH24MISS')
                  ) colvalue
    from partial_search_history, (select rownum r, column_name
                                  from user_tab_columns
                                  where table_name = 'PARTIAL_SEARCH_HISTORY')
    where run_no = 356You can build the decode by doing
    SELECT ''''||COLUMN_NAME||''',TO_CHAR('||COLUMN_NAME||'),'
    FROM user_tab_columns
    where table_name = 'PARTIAL_SEARCH_HISTORY'A decode on DATA_TYPE field would allow you to add a format mask for DATE fields if necessary.

  • File Write Adapter, First record as a Column Header

    Hi,
    Using File adapter of type WRITE i m creating a file.
    I want to include the column header also as a first record in File.
    One way i can think of Creating one record manually and append as a first record in the File write variable.
    Is there any other simple way or standard way to do it??

    To have fixed header every time before it writes the data, i think you should have file with header and data, then use it to configure file write in JCA adapter.
    This will create a schema with static header and dynamic results to the schema file.
    So that everytime you will have the header then it write the data below that.
    Note: I have done this some years back, i wrote here with from my memory.
    Let me know if you still have problem, wll try to create a simple example and share.
    Thanks,
    Vijay

  • Convert to column records to column header

    Dear All, 
    I have a query, where i have a table where two columns is there.
    I want to write a query convert first column records in Column header and second column records
    would come under that header.
    Col1 Col2
    FirstName Ajay
    LastName Nath
    DOB 25/08/1981
    Gender Male
    Output
    FirstName LastName DOB Gender
    Ajay Nath 25/08/1981 Male
    Please help me

    Please read any book on RDBMS. You have no idea what a table is. This is a report, not a query. This is so basic, how do you not know this? 
    Heck, you did not even use ISO-8601 date formats in your silly picture! Oh, ISO has a sex_code, not gender, standard that you are not using. 
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • How to return a record's column head given a record of a table.

    Hi:
    Do you know how to return a record's column head given a record of a table.
    For example, in a table with 3 columns "ID", "Education", "Age".
    Give you the record "Bachelor", how can you use a SQL to return the correspondent column head "Education"?
    Thanks for the big help.

    Have a look at http://java.sun.com/j2se/1.4.2/docs/api/java/sql/ResultSetMetaData.html.
    import java.sql.*;
    import java.util.*;
    ResultSet rs = stmt.executeQuery("SELECT * FROM testTable");
    ResultSetMetaData rsmd = rs.getMetaData();
    // loop through rsmd.getColumnCount() {
         String columnName = getColumnName(i);
         // run a query SELECT * FROM testTable WHERE columnName='Bachelor'
         // if rs !=null return columnName and break out of the loop
    }

  • Child Records

    Hi,
    I have master and child block. Join column is Header id.
    I want to enforce the user to enter atleast one record in the child block before saving the header record.
    How to do this.
    Regards/Prasanth

    Couldn't you make some of the child records 'required'?
    Another option is to check on forms commit if certain fields are filled.
    regards,

  • How to avoid WRAP of EXCEL Column HEADER Fields

    We have 3 tablix in the rdl file with 11 inch * 8.5 inch (to print in A4)
    Tablix 1 - HTML viewer
    Tablix 2 - EXCEL
    Tablix 3 - PDF 
    The size of the rdl is fixed , if size altered then printing becomes an issue.
    So we have to keep the rdl size fix
    but at the same time the WRAP of column header of the EXCEL need to be avoided ,
    because if the size of the column header is not reduced then we cannot be able to accomodate in the defined page size
    Eaxmple of SOme Header Field Name 
    1.OccupationCode 
    2.ChargeJobPhase which are quiet large fields, so it need to be wrapped(to reduce the length of the column to accomodate ) to fit in the page.
    So as an Alternative option  I use the COncept of Subreport and called it by adding row outside group otherwise the
    Report Server treats subreport as new report for each instance of the parent report.
    The challenge we faced is when export to EXCEL some of the columns is getting merged , I believe the size of the child report (sub report) is having the length
    greater than the parent report (Called Report )  and the size has to be large otherwise the COLUMN HEADER need to reduced which makes it Wrapped 
    So  is there any alternative without changing the parent report size and without WRAPPING the HEADER text of CHild report the MERGING of cell can be avoided.
    Since MERGING is happening which is not allowing us to PUT  FILTER in EXCEL but we need to have FILTER applicable since the END user use it to sort, find the records.

    Hi SubhadipRoy,
    In Reporting Services, whether to wrap text or not is depended on the CanGrow property. If we set the CanGrow property of tablix header row to true, then the header row of tablix will be expanded. If we set the CanGrow property of tablix header row
    to false, the header row will be shrunk as the designed size.
    So if we want to avoid wrap text, we can try to set the CanGrow property of tablix header row to false in Reporting Services level. Alternatively, we can click the Wrap Text button to enable the expended extra-long text property in Excel level.
    If there are any other questions, please feel free to ask.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Excel like 'Freeze column header' functionality in sharepoint OOB list view webpart

    Hi,
    I have OOB external list dropped on a page as listview webpart. It contains many records and hence while scrolling down headers are no available, hence it should freeze all column headers while scrolling down the page. Its directly dragged and dropped
    on site page hence no server side formatting can be done.
    Is there any way we can apply some client side script to freeze column headers to listview webpart while scrolling down? or any settings that can be done to acheive this?
    Thanks in advance.
    Regards,
    Rahul

    Hi Rahul,
    Normal techniques for freezing the header row of an HTML table tend to fall short when it comes to SharePoint 2010 lists due to the lack of THEAD elements.
    You can try something like this, although you may want to test it in various browsers in case the column heading alignment is off.
    <style>
    .ms-viewheadertr{background-color:white;}
    </style>
    <script>
    /* wrap the table in a div, set its height, give it scrollbars, and move it down */
    var myTable = document.querySelector(".ms-listviewtable");
    var wrapperDiv = document.createElement('div');
    wrapperDiv.setAttribute("ID","FreezePaneWrapper");
    wrapperDiv.setAttribute("style","OVERFLOW: auto; HEIGHT: 400px; padding-top:38px;");
    wrapperDiv.appendChild(myTable.cloneNode(true));
    myTable.parentNode.replaceChild(wrapperDiv,myTable);
    /* Freeze the header row and move it up*/
    var headerRow = document.querySelector(".ms-viewheadertr");
    document.getElementById("FreezePaneWrapper").style.width = "" + headerRow.scrollWidth + "px";
    headerRow.style.width = "" + headerRow.scrollWidth + "px";
    headerRow.style.position = "absolute";
    headerRow.style.top = ""+(headerRow.offsetTop-39)+"px";
    /* Tell the header's columns to be the same width as the cells in the first "alternating" row */
    var columns = document.querySelector("table.ms-listviewtable tr.ms-alternating").querySelectorAll("tr>td");
    headers = document.querySelectorAll("tr.ms-viewheadertr th");
    for(var i = 0; i < headers.length; i++){
    if(columns[i].scrollWidth > headers[i].scrollWidth){
    headers[i].style.width = ""+columns[i].scrollWidth + "px";
    }else{
    columns[i].style.width = ""+headers[i].scrollWidth + "px";
    </script>
    Edit: Also, you may want to inspect the HTML attributes on the external list view to be sure the class names match up with the querySelector parameters above. Specifically, the table should have a class of "ms-listviewtable", the header row should
    have a class of "ms-viewheadertr", and rows of alternating background color should have a class of "ms-alternating".
    If any of those are different in your case, you may be able to adjust the above code accordingly.

  • How to Link column header only in classic Report in APEX 4.1

    Hello Everybody,
    Probably there is a simpler way to do this, but I am not sure. I want a link on column header in Report on a specific column. The link will take me to new region or a page.
    How to achieve this in APEX 4.1
    Theme : Blue 2
    Database 11g
    I see there is a column link opiton, but that creates link for every row in that column on a specific icon, I just want link on a title of the column in Classic Report.
    For Example,
    if there are two columns Name and Client ID, which has 10 records to display on a classic report. I wan the link on Client ID on header only not on the records.
    Can anybody provide some simple solution for this.
    Thanks,
    --CP
    Edited by: cpora007 on Jun 22, 2012 10:38 AM

    Hello,
    I didn't understand, what do you mean by default it is going to sort popup. I have a classic report based on SQL, which generates a report with static header, there is no sort or any other link on that.
    I added a link in column header name with an anchor. It works and takes to the new page.
    But it is not a proper solution. A solution based on Jquery dynamic action is preferable. Also the preferred option is that the link opens a hidden region of the same page at the same location of the report and the report gets hidden. after the procession on the form region and submitting the update/ insert process. the report region shows up with the change data.
    Moving on to new page is 2nd option, if the first do not work.
    In the JavaScript, put: apex.submit("GO_TO_MY_OTHER_PAGE");
    On the page, create a Branch to the Second page. Set the condition to Request=Expression 1. Set the request to "GO_TO_MY_OTHER_PAGE"
    On which page I need to create a branch?, Is it on the report page or the form page.
    Thanks a lot for the response. I appreciate your kind efforts in this regard.
    --CP                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Infinite loop creating new page due to column header overflow.

    i am getting an error and some pages "Infinite loop creating new page due to column header overflow. " --
    using report builder 9, i have a fairly simple report - that contains 4 subreports.
    for some pages i get the error - it seems if there is more data than would fit on 1 page.
    smaller pages work fine.
    the subreports are all simple queries and dumps....
    containing page header, column header, detail sections.
    page header has just a text bar of the name of the section.
    column header has the field names
    detail section has the data - 1 row for each row in the recordset.
    nothing i do seems to change getting "Infinite loop creating new page due to column header overflow. " on a page with more than 15-20 records returned.
    any ideas would be appreciated.

    Try these links if you are still having the issue:
    http://community.jaspersoft.com/questions/543302/receive-infinite-loop-creating-new-page-d ue-column-header-overflow-exception
    http://community.jaspersoft.com/questions/500177/infinite-loop-due-page-header-overflow

  • Sub report in column header

    Infinite loop creating new page due to column header overflow.
    I have a sub report on the column header which works,
    Because my sub report return different records from data source, it fails and get infinite loop error message like above when I have 9 records, it works less than 9 records.
    I would like to know my sub report returns records some times more, are there any place for my subreport?
    Are there limit for sub report?
    Your help and information is great appreciated,
    Regards,
    Iccsi,

    Thanks for the message and help,
    My sub report link to a data soruce which is a stroed procedure running from MS SQL server.
    The stroed procedure returns data based on data base what data in the table.
    It looks like the sub report on the Report Builder limited by the length of the report band.
    I tried to move to column header, column footer, report footer all the same, when the sub report growth then it fails to generate the reports.
    Regards,
    Iccsi,

  • Inserting parent /child records from a xml file ...

    XML file pasted below:
    I have loaded the xml file into a table called xml_demo which has a column xml_data of type xmltype.
    The select for parent record is as follows and it works:
    INSERT INTO balit_submissions (balitdoc, documentversion, datetime_from,job_id, status,creation_datetime)
    (SELECT 'MOL'
    ,to_number(extract(x.xml_data,'/MolDocument/DocumentVersion/@v'))
    ,to_date(substr(extract(x.xml_data,'/MolDocument/ValidTimeInterval/@v'),1,16),
    'yyyy-mm-dd"T"hh24:mi')
    ,123456
    ,'CREATED',
    NULL
    FROM xml_DEMO x WHERE
    existsnode(x.xml_data,'/MolDocument/DocumentIdentification[@v="MOL_20100331_1500_1600"]') = 1)
    Having problem creating child records. From this file I expect to create 3 records.
    insert into balit_energy_blocks
    SO_ID,
    DATETIME_FROM,
    DIRECTION,
    BLOCK_NUMBER,
    ENERGY,
    LAST_SUBMIT_DATETIME,
    PRICE_POUNDS,
    PRICE_EUROS,
    BALIT_REF,
    STATUS,
    LAST_EDIT_DATETIME,
    MOL_REASON,
    ACQUIRING_SO_AREA)
    (SELECT 'RTE'
    ,to_date(substr(extract(x.xml_data,'/MolDocument/ValidTimeInterval/@v'),1,16),
    'yyyy-mm-dd"T"hh24:mi')
    ,DECODE(extract(x.xml_data,'/MolDocument/MolTimeSeries/Direction/@v'),'AO1','Up','Down')
    ,to_number(substr(extract(x.xml_data,'/MolDocument/MolTimeSeries/ContractIdentification/@v'),19))
    ,to_number(extract(x.xml_data,'/MolDocument/MolTimeSeries/Period/Interval/EnergyPrice/@v'))
    ,sysdate
    ,null -- price pounds
    ,null -- price euro
    ,extract(x.xml_data,'/MolDocument/MolTimeSeries/ContractIdentification/@v')
    ,'SUBMITTED'
    ,'A96'
    ,NULL -- acquiring area
    ,sysdate
    FROM xml_DEMO x WHERE
    existsnode(x.xml_data,'/MolDocument/DocumentIdentification[@v="MOL_20100331_1500_1600"]') = 1)
    For example, there are 3 ContractIdentification tags. Example of 1:
    <ContractIdentification v="RTE_20100331_1500_16"/>
    I was expecting this select to pluck the last number from this string. In this case 16.
    The select was:
    to_number(substr(extract(x.xml_data,'/MolDocument/MolTimeSeries/ContractIdentification/@v'),19))
    The result I got was:
    16RTE_20100331_1500_20NG_20100331_1500_6
    All contractident values are concatnated and returns from position 19 onwards.
    Can anyone help me to extract the last number from each ContractIdentification tag value and to create the 3 records
    Thanks
    James Sathiaraj
    <?xml version="1.0" encoding="UTF-8"?>
    <MolDocument DtdVersion="3" DtdRelease="0">
    <DocumentIdentification v="MOL_20100331_1500_1600"/>
    <DocumentVersion v="1"/>
    <DocumentType v="A43"/>
    <SenderIdentification codingScheme="A01" v="17X100Z100Z0001H"/>
    <SenderRole v="A35"/>
    <ReceiverIdentification codingScheme="A01" v="10XFR-RTE------Q"/>
    <ReceiverRole v="A04"/>
    <CreationDateTime v="2010-03-31T14:10:00Z"/>
    <ValidTimeInterval v="2010-03-31T15:00Z/2010-03-31T16:00Z"/>
    <Domain codingScheme="A01" v="10YDOM-1001A001A"/>
    <MolTimeSeries>
    <ContractIdentification v="RTE_20100331_1500_16"/>
    <ResourceProvider codingScheme="A01" v="10XFR-RTE------Q"/>
    <AcquiringArea codingScheme="A01" v="17Y100Z100Z00013"/>
    <ConnectingArea codingScheme="A01" v="10YFR-RTE------C"/>
    <AuctionIdentification v="AUCTION_20100331_1500_1600"/>
    <BusinessType v="A10"/>
    <BidTimeInterval v="2010-03-31T15:00Z/2010-03-31T16:00Z"/>
    <MeasureUnitQuantity v="MAW"/>
    <Currency v="EUR"/>
    <MeasureUnitPrice v="MWH"/>
    <Direction v="A02"/>
    <MinimumActivationQuantity v="50"/>
    <Status v="A06"/>
    <Period>
    <TimeInterval v="2010-03-31T15:00Z/2010-03-31T16:00Z"/>
    <Resolution v="PT60M"/>
    <Interval>
    <Pos v="1"/>
    <Qty v="50"/>
    <EnergyPrice v="50.45"/>
    </Interval>
    </Period>
    </MolTimeSeries>
    <MolTimeSeries>
    <ContractIdentification v="RTE_20100331_1500_20"/>
    <ResourceProvider codingScheme="A01" v="10XFR-RTE------Q"/>
    <AcquiringArea codingScheme="A01" v="17Y100Z100Z00013"/>
    <ConnectingArea codingScheme="A01" v="10YFR-RTE------C"/>
    <AuctionIdentification v="AUCTION_20100331_1500_1600"/>
    <BusinessType v="A10"/>
    <BidTimeInterval v="2010-03-31T15:00Z/2010-03-31T16:00Z"/>
    <MeasureUnitQuantity v="MAW"/>
    <Currency v="EUR"/>
    <MeasureUnitPrice v="MWH"/>
    <Direction v="A02"/>
    <MinimumActivationQuantity v="50"/>
    <Status v="A06"/>
    <Period>
    <TimeInterval v="2010-03-31T15:00Z/2010-03-31T16:00Z"/>
    <Resolution v="PT60M"/>
    <Interval>
    <Pos v="1"/>
    <Qty v="50"/>
    <EnergyPrice v="50.48"/>
    </Interval>
    </Period>
    </MolTimeSeries>
    <MolTimeSeries>
    <ContractIdentification v="NG_20100331_1500_6"/>
    <ResourceProvider codingScheme="A01" v="10X1001A1001A515"/>
    <AcquiringArea codingScheme="A01" v="17Y100Z100Z00013"/>
    <ConnectingArea codingScheme="A01" v="10YGB----------A"/>
    <AuctionIdentification v="AUCTION_20100331_1500_1600"/>
    <BusinessType v="A10"/>
    <BidTimeInterval v="2010-03-31T15:00Z/2010-03-31T16:00Z"/>
    <MeasureUnitQuantity v="MAW"/>
    <Currency v="EUR"/>
    <MeasureUnitPrice v="MWH"/>
    <Direction v="A01"/>
    <MinimumActivationQuantity v="50"/>
    <Status v="A06"/>
    <Period>
    <TimeInterval v="2010-03-31T15:00Z/2010-03-31T16:00Z"/>
    <Resolution v="PT60M"/>
    <Interval>
    <Pos v="1"/>
    <Qty v="50"/>
    <EnergyPrice v="17.0"/>
    </Interval>
    </Period>
    </MolTimeSeries>
    </MolDocument>

    Hi,
    The result I got was:
    16RTE_20100331_1500_20NG_20100331_1500_6In the query you tried, you access a single record so you can't expect to get three rows "magically". The EXTRACT function just works as expected, it extracts the requested nodes, but the result is still an XML fragment (a scalar value).
    In order to achieve your goal, you have to break the MolTimeSeries sequence into relational rows.
    Two similar solutions are possible, XMLTable (10gR2 and up) or Table/XMLSequence.
    In your other post you mentioned db version 10.1, so I guess we'll go with XMLSequence :
    SELECT 'RTE'
           ,to_date(substr(extractvalue(x.xml_data,'/MolDocument/ValidTimeInterval/@v'),1,16),'yyyy-mm-dd"T"hh24:mi')
           ,decode(extractvalue(x2.column_value,'/MolTimeSeries/Direction/@v'),'A01','Up','Down')
           ,to_number(regexp_substr(extractvalue(x2.column_value,'/MolTimeSeries/ContractIdentification/@v'),'\d+$'))
           ,to_number(extractvalue(x2.column_value,'/MolTimeSeries/Period/Interval/EnergyPrice/@v'))
           ,sysdate
           ,null
           ,null
           ,extractvalue(x2.column_value,'/MolTimeSeries/ContractIdentification/@v')
           ,'SUBMITTED'
           ,'A96'
           ,null
           ,sysdate
    FROM xml_demo x,
         table(
           xmlsequence(
             extract(x.xml_data, '/MolDocument/MolTimeSeries')
         ) x2
    WHERE existsnode(x.xml_data,'/MolDocument/DocumentIdentification[@v="MOL_20100331_1500_1600"]') = 1;Please also note the use of REGEXP_SUBSTR instead of the regular SUBSTR because it didn't work for "NG_20100331_1500_6".
    Hope that helps.
    Edited by: odie_63 on 24 juin 2010 21:18 - added regexp comment

  • Supress Column Heading - File Content Conversion in Sender Adapter

    Hi,
    Let me give a more clear picture about my scenario.  I need to convert CSV File to XML output:-
    My source file has column heading and values.  The sample data is mentioned hereunder:-
    PERNR;KID;PNALT;NACHN;NAME2;VORNA
    ;1200;1200;Angus
    I have created a data type as under:-
    DT_LegacyEmployee (Category - Complex Type)
         Employees (Category - Element, Occurence - 1)
              Header (Category - Element, Occurence - 0...1)
                   PERNR_H
                   KID_H
                   PNALT_H
                   NACHN_H
                   NAME2_H
                   VORNA_H
              Employee (Categroy - Element, Type - DT_LegacyEmployee_Row, Occurence - 0...unbounded)
                   PERNR
                   KID
                   PNALT
                   NACHN
                   NAME2
                   VORNA
    The file conversion parameters in the file sender adapter are mentioned hereunder:-
    Document Name - MT_LegacyEmployee
    Document Namespace - http://abc.com/xi
    Recordset Name - Employees
    Rescordset Structure - Header,1,Employee,*
    Recordsets per Message - 1
    Key Field Type - String (Case Sensitive)
    Employee.fieldSeparator - ;
    Employee.endSeparator - 'nl'
    Employee.fieldNames - PERNR,KID,PNALT,NACHN,NAME2,VORNA
    I dont' have a key field value.  How do we remove the header and show only the values in the xml output.  I have searched the forum topics as well checked many blogs related to file content conversion, but nothing helped.  Kindly advice how to fix this issue.  Thanks in advance.
    Regards.
    Praveen

    Hi Praveen,
    Change your File Adapter as below
    Document Name - MT_LegacyEmployee
    Document Namespace - http://abc.com/xi
    Recordset Name - Employees
    Rescordset Structure - Employee,*
    Recordsets per Message - 1
    Key Field Type - String (Case Sensitive)
    Employee.fieldSeparator - ;
    Employee.endSeparator - 'nl'
    Employee.fieldNames - PERNR,KID,PNALT,NACHN,NAME2,VORNA
    There is no need for the Header required in the data type.
    DT_LegacyEmployee (Category - Complex Type)
    Employees (Category - Element, Occurence - 1)
    Employee (Categroy - Element, Type - DT_LegacyEmployee_Row, Occurence - 0...unbounded)
    PERNR
    KID
    PNALT
    NACHN
    NAME2
    VORNA
    Now the trick is in the mapping program
    Lets assume your mapping looks like
    MT_LegacyEmployee ---> MT_TargetEmployee
    - Employees ---> Records
       - Employee ---> Record
         - PERNR  ---> TargetPERNR
         - .. so on
    When you do a mapping from Employee ---> Record apply the following logic.
    (PERNR)--->
                 (TestEquals =) --->(NOT)--->
    (Constant) --->                                (IF)
    (PERNR)                       (IF Without Else) ---> (Record)
                                                   (THEN)
                                (Employee)--->
    When doing this make sure RightClick on PERNR and Select Context ---> Employees.
    By default context would be from Employee and it will give you an error of XSD format. So make sure you are changing the context.

  • How to update child record when item from parent record changes

    Hi, I have a master and detail form with two regions on the same page.
    Region one references parent record, one of column in the parent record is also in the child record. And is one to many relation
    between parent record and child record. How can I have the column on the child record updated when the column of the parent record is being modified?
    For exemple; Parent record has two columns : ID and Program.
    Child record has Program, goal# and status. I have two pages established, page 27 and page 28.
    Page 27 list out all programs from parent record, by clicking on edit to a program, it braches to page 28 with program listed as editable field in region one, and mulitple records list in region two from the child record with the same program.
    The problem that I am having is once the program in region one got modified using ApplyMRU, the program in child record did not get updated with the new value and therefore those record become orphan records. I need a way to update all current child records with the new program value.
    Thanks in advance for anyone who can hlep out on this problem.
    Julie
    Edited by: JulieHP on May 24, 2012 4:57 PM

    One Idea is
    If possible create a after update database trigger on the parent table to update the relevant child record.
    Next one
    Create a PL/SQL process on the parent page with process sequence next to ApplyMRU, so when the ApplyMRU is seccessfull it goes not to your process where you can have your update statement

  • Parent/child records from same table

    I want to create a query that is a union such that the 2nd resultset is based on the 1st resultset. I have a table that has parent/child records in the same table.
    Table: EVENTS
    EVENT_ID
    PARENT_EVENT_ID
    CREATED_DATE
    (other columns)
    if PARENT_EVENT_ID is null then it is a parent record, else it is a child record. I want to select all parent records then union them with all the associated child records...something like this:
    select * from EVENTS where CREATED_DATE < sysdate - 90 and PARENT_EVENT_ID is null -- All parents
    union
    select * from EVENTS where PARENT_EVENT_ID in (select EVENT_ID from EVENTS where CREATED_DATE < sysdate - 90 and PARENT_EVENT_ID is null) -- include any children of parents selected from above
    This works but it's kind of ugly, I want to avoid using the sub-select in the 2nd because it is a repeat of the 1st statement, is there a way to alias the first statement and just refer to it in the 2nd query?

    Hi,
    kev374 wrote:
    Thanks, one question...
    I did a test and it seems the child rows have to also satisfy the parent row's where clause, take this example:
    EVENT_ID|PARENT_EVENT_ID|CREATED_DATE
    2438 | (null) | April 9 2013
    2439 | 2438 | April 11 2013
    2440 | 2438 | April 11 2013
    select * from EVENTS where CREATED_DATE < sysdate - 9
    start with EVENT_ID = 2438
    connect by PARENT_EVENT_ID = prior EVENT_IDSo you've changed the condition about only wanting roots and their children, and now you want descendants at all levels.
    This pulls in record #2438 (per the sysdate - 9 condition) but 2439 and 2440 are not connected. Is there a way to supress the where clause evaluation for the child records? I just want to pull ALL child records associated with the parent and only want to do the date check on the parent.Since the roots (the only rows you want to exclude) have LEVEL=1, you can get the results you requested like this:
    WHERE   created_date  < SYSDATE - 9
    OR      LEVEL         > 1However, since you're not ruling out the grandchildren and great-grandchildren any more, why wouldn't you just say:
    SELECT  *
    FROM    events
    WHERE   created_date     < SYSDATE - 9
    OR      parent_event_id  IS NOT NULL;?
    CONNECT BY is slow. Don't use it if you don't need it.
    If you x-reference my original query:
    select * from EVENTS where CREATED_DATE < sysdate - 90 and PARENT_EVENT_ID is null -- All parents
    union
    select * from EVENTS where PARENT_EVENT_ID in (select EVENT_ID from EVENTS where CREATED_DATE < sysdate - 90 and PARENT_EVENT_ID is null) -- include any children of parents selected from above
    The 2nd select does not apply the created_date < sysdate - 90 on the children but rather pulls in all related children :)Sorry; my mistake. That's what happens when you don't post sample data, and desired results; people can't test their solutions and find mistakes like that.

Maybe you are looking for

  • Send a mail to the agents

    hi my question is send the mail to the assigned agents after the task is go through a condition, and condition fails it also have send mail and true it has send mail to the agents. I have designed the workflow and all other parts are working fine whe

  • How to make Parameter value look a certain way

    Hi I am having a bit of an issue where I have created a Number Parameter (Dynamic - based off OPCH.WPANO). Under Select expert  > Record I selected OPCH.WPANO Equal to {?WPA Number}, so my formula looks as follows: {OPCH.U_WPANO} = {?WPA Number} But

  • We have desktop licenses with current SA, shouldn't we be able to add MDOP?

    We currently have desktop licenses with current software assurance. We would like to add MDOP, but our vendor tells us that Microsoft does not permit MDOP to be added because we purchased our licenses as Open Business + SA instead of Open Value + SA.

  • How-to: mail a bunch of QT or poster frames that link ...

    to a site where the high res of them resides? tx JP

  • How do I edit the "Content Created" date?

    I've been storing all of my DSLR video in Aperture 3, and would like to import that video (as referenced Events) into Final Cut Pro X.  So far, I've noticed that some of my video is showing a very inaccurate "Content Created" date; is there any way t