Master and Details Tables Data

Hi all
I have two tables one is Master table and other one is Details table.
How to write a query to get Master as well as Details table data.
Detail table contain more than one record for particular Master Record.
Pls Help me.

My version is Oracle 9i
My Tables structures are :
SQL> desc TFMS_CONTRACT_PRICES
Name Null? Type
ITEMNUMBER NOT NULL VARCHAR2(30)
ITEMDESCR VARCHAR2(2000)
PRICE NOT NULL NUMBER
UOM VARCHAR2(30)
UNITSAWARDED NUMBER
DELIVERYPERIOD NUMBER
COMMENTSREASON VARCHAR2(15)
TOTALPOINTSSCORED NUMBER
FREEDELIVERY VARCHAR2(250)
YEAR VARCHAR2(15)
UPDATEDBY NOT NULL NUMBER
UPDATEDON NOT NULL TIMESTAMP(6)
BRANDID NOT NULL NUMBER
CONTRACTORID NOT NULL NUMBER
ISPRICEESCALATED NOT NULL CHAR(3)
SQL> desc TFMS_ACCESSORIES_MASTER
Name Null? Type
ACCESSORYID NOT NULL NUMBER
ACCESSORYNAME NOT NULL VARCHAR2(150)
DESCR VARCHAR2(250)
ISDELETED NOT NULL CHAR(1)
UPDATEDBY NOT NULL NUMBER
UPDATEDON TIMESTAMP(6)
CONTRACTORID NOT NULL NUMBER
Sample Out put:
ITEMNUMBER ACCESSORYNAME
RT57-01-13-01 Truck ToolBoxes,Riding Sun Glass
RT57-01-13-02 Door Guard,Maruthis
For one item number there may be one accessory name or more than one accessory name.i need to display accessory names with delimeter(,).
Pls help me.
Thanks in Advance.

Similar Messages

  • How to show master and detail tables in different pages?

    Hi,
    Can somebody expalin me how to include or bind the master and detail tables to different pages which are included at runtime.
    thnaks,
    Naresh.

    Hello!
    you have ti create a Master/Detail data structure.
    In the first page drag the master table, on the second drag a detail table.
    It should work out of the box. Selecting a record on the master table selects
    the details on the detail table automatically!
    regards,
    Mario Udina

  • Master and detail table in same block

    Master Table - Group Maintenance
    Columns - Group ID, Group Desc
    Detail Table - Group Usage
    Columns - Group ID(foreign key to Group Maint. table), forecast_date, plan_date, actual_date
    I am trying to create a form that will display both tables in one tabular block. I want to be able to insert/update both tables from this form. I can't seem to get it to work right. I have tried adding non table items to the master block and updating manually but changes to only the non table items don't change the record status so the form says 'no changes to save'. Any ideas?

    I'm not quite sure what's your requirement. Are some rows belonging to the master-table and some to the detail-table? If not, what happens if you change the master-table-attributs in one row. What then with the master-table-attributs in other records?
    About the non-database-items:
    There is a property "Lock record" at item-level, if you set that to Yes, the record will be marked as changed also if the item is a non-db-item.
    Another possibility would be to create a db-view with your master-detail-columns so that every item is a database-item. To write back data you could use an INSTEAD-OF-trigger on the view.

  • Master and Details Tables

    Hello Experts,
    While entering any transactional document, like DO or SO system enter the data in a Master Table for example in ODLN and DLN1. that is ok
    is there any other table in which system keeps the reference. for a document entered.
    Help Required.....

    Thanks for reply,
    actually I was trying to ask that other than ODLN and DLNx tables is there any other table in which system keeps the track for checking the integrity of data / document i.e. like if we have entered document 
    number 10036,
    will system keep the track of this document in any other table other than ODLN and DLNx tables ....
    help required.
    Edited by: Rui Pereira on Apr 30, 2009 2:00 PM

  • Help!The synchronization of master and detail tables

    Is there a simple method to synchronize zhe primary key of detail table with master table?

    Needin to modify a primary key column is a sure sign of a data modeling deficiency. Primary keys are generally not modified. If they contain children data, trying to modify them is not allowed by Oracle (I received "ORA-02292: integrity constraint (SCOTT.FK_DEPTNO) violated - child record found" when I tried, in 10.2). Any way to revisit this primary key, to be sure it should really consist of those columns? Otherwise, the only way I see to implement what you want is to have an "after update of ..." trigger.
    Daniel

  • Query Question: Sum of master and monthly table data

    Hi All,
    I have two tables that store financial data about programs. The PROGRAM table has the following columns (for purposes of this discussion):
    ID, INITIAL_BUDGET, COST_CENTER
    The PROGRAM_MONTHLY table has the following (abbreviated list of) columns:
    ID, PROGRAM_ID (FK to PROGRAM.ID), CURRENT_FORECAST, RECORD_DATE
    Every month, a copy of the program_monthly records for last month is made to new records in the PROGRAM_MONTHLY table and we use RECORD_DATE for our filters and comparisons. This way we have historical data, plus current month data that can be updated by our financial systems and program managers.
    I am using Application Express and would like to create a dashboard chart that shows the summary of the INITIAL_BUDGET and the CURRENT_FORECAST for a selected month. Obviously, the INITAL_BUDGET doesn't change, but the CURRENT_FORECAST (and similar columns such as the amount committed to purchase orders, which were omitted to simplify the discussion) change monthly.
    My goal is to create a chart that can display the initial budget, current forecast, amount committed on purchase orders, etc. for all cost centers, or just one at a time as the user requires, that is filtered by the month of the PROJECT_MONTHLY record. If I can come up with the statement for a view or query, then I can manage the rest.
    The required syntax for the chart is "SELECT link, label, value FROM...", where "link" can be NULL, since is it an optional link to another URL. The "label" and "value" portion are the important parts.
    For example, I have another chart that shows the project status (which is a Varchar 2 constrained to values such as, Active, On-Hold, Completed, etc.) with the status as the label and the count of the rows as the value. It starts:
    select null link, pjm.PROJECT_STATUS label, COUNT(pjm.ID) value FROM ... However, I have been unable to come up with a query that generates the desired results for these PROGRAM and PROGRAM_MONTHLY tables. I have played with various types of joins and sub-queries, but my SQL just isn't up to the challenge yet. I realize that I might have to re-work the table structure to accomodate this requirement.
    I would greatly appreciate any guidance in approaching this problem.
    Many thanks for your time and help,
    Petie

    Certainly, Warren, thanks so much for your willingness to look at my problem.
    To keep things simple, I will put the fundamentals of the tables with sample data. Please let me know if you would like more and I would be happy to provide it.
    Table: PROGRAM
    ID   PROGRAM_NUMBER   INITIAL_BUDGET   COST_CENTER
    1   10001            100000           500-001
    2   10002            125000           500-001
    3   10003            150000           500-002
    4   10004            175000           500-002
    5   10005             10000           500-003
    6   10006            200000           500-004Table: PROGRAM_MONTHLY
    ID   PROGRAM_ID   CURRENT_FORECAST  RECORD_DATE
    1    1            95000            02-FEB-06
    2    2           125000            02-FEB-06
    3    3           145000            02-FEB-06
    4    4           180000            02-FEB-06
    5    5             9000            02-FEB-06
    6    6           225000            02-FEB-06
    7    1            97500            02-MAR-06
    8    2           120000            02-MAR-06
    9    3           145000            02-MAR-06
    10    4           185000            02-MAR-06
    11    5            10000            02-MAR-06
    12    6           215000            02-MAR-06
    Report Example 1
    When a user would like to see the current summary data for all cost centers, they would see a chart with the following data:
    INIT_BUDGET  CURRENT_FORECAST
    760000       772500
    Report Example 2
    When a user would like to see the summary data for all cost centers for last month, they would see a chart with the following data:
    INIT_BUDGET  CURRENT_FORECAST
    760000       779000
    Report Example 3
    When a user would like to see the current summary data for cost center 500-001, they would see a chart with this following data:
    INIT_BUDGET  CURRENT_FORECAST
    225000       220000I hope this better illustrates the solution I seek.
    Thank you again for your time and assistance
    Petie

  • Advanced table in advanced table- Need custom Detail table data.

    hi,
    I have a advanced table in table. Now for the inner detail table I have a Language column. For each row in master table I have correspoding 3 detail table records for 3 different languages. This languages are related to another master table called Language where there is a flag that indicates that this is a Installed language.
    Now what I want to do is instead of showing the data from the master and detail table, I want to show the languages from the master language table ( say example French, Chinese, Spanish - for which I have corresponding records in detail table). If tomorrow, I have a new language that is installed ( i.e. the flag in the master Language table is set to Y), the automatically a new row should get added in the detail table with the new langauge . say e.g. if tomorrow German language is installed the detail table rows should have 4 rows ( including German to be displayed)
    CAn this be achieved with the master - detail advanced table layout ?
    Sorry if not clear, i can try to explain again :(

    Vishal
    Please post your complete code so that we can diagnose it further.
    While posting the code please enclose it between {noformat}{noformat}.
    for e.g.
    {noformat}{noformat}
    select * from dual;
    {noformat}{noformat}
    looks likeselect * from dual;
    Thanks
    AJ                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Master and Detail records in the same table

    Hi Steve,
    I have master and detail address records in the same table (self-reference). The master addresses are used as templates for detail addresses. Master addresses do not have any masters. Detail addresses have three masters: a master address, a calendar reference and a department. Addresses change from time to time and every department has its own email-account, but they refer to the same master to pre-fill some common values.
    Now I need to edit the master and detail address records on the same web page simultaneously.
    My question is: Can I implement a Master-View and Detail-View which refer to the same Entity-Object? Or should I implement a second Entity-Object? Or can it be done in a single Master-Detail-View?
    Thanks a lot.
    Kai.

    At a high level, wouldn't this be similar to an Emp entity based on the familiar EMP table that has an association from Emp to itself for the Emp.Mgr attribute?
    You can definitely build a view object that references two entity usages of the same entity like this to show, say, an employee's ENAME and at the same time their manager's ENAME.
    If there are multiple details for a given master, you can also do that with separate VO's both based on the same entity, sure. Again, just like a VO that shows a manager, and a view-linked VO of all the employees that report to him/her.

  • Problem with Master and Child table

    Hi,
    Working in jdev 11.1.1.2.0. I have one strange issue. i have master and child tables, the model is working fine with the view link. but when drag drop the same into my jsff. when i query the result 1st time 2 tables are refershing properly and data is coming. but the when i trying to select another row in the 1st table my 2nd table(child table) is not refreshing.
    i put partial trigger of the 2nd table as 1st table id.
    can any one help wht is issue here.
    Edited by: user5802014 on Jul 15, 2010 3:44 PM

    Check this post might help you
    http://baigsorcl.blogspot.com/2010/03/creating-master-detail-form-in-adf.html

  • Master and detail in the same page

    db11xe , apex 4.0 , firefox 24 ,
    hi all ,
    i am trying to insert the master and detail data in one step in the same page :
    i have two tables (clients) and (tests_administered)
    the client table's region contains theses items
    client_id
    client_name
    the other table's region contains these columns -- the tabular region
    row selector
    test_admin_id -- pk,  hidden
    client_id          -- hidden , this is the one i should populate with values
    and more columns
    i've done this :
    1- removed the condition of the tabular region .
    2- Added the request CREATE to the list in condition of the APPLYMRU process -- or :request like ('CREATE')
    3- Added new process with following code : -- with sequence before the applymru process and after process row of clients process
    for i in 1..apex_application.g_f02.count
    loop
    apex_application.g_f02(i) := :p2_client_id ;
    end loop ;
    but nothing happened . why ? what did i miss ?
    thanks

    Hi,
    Create a Master Detail Form through the APEX Wizard 
    Make sure you choose the Primary Keys for the Master Detail as one of your Column and not the ROW ID.
    Selecting an existing Sequence for the Primary Key is preferred.
    Select the option the where your Master and Detail appears in the same page.
    Initially when you run the page your master and detail will not appear at the same time in the page when your Master Detail Form is in the entry form mode. For this you have to go to your Tabular Form(Detail Form) region, and below you will have to remove the Condition for the display of your Tabular form and set it to “No Condition”.
    Now when you run the page both the Master and Detail form will appear together in the create mode but you will not be able to insert or create both master and detail records at the same time when u click the create button. For this the following needs to be done: You need to create a PL SQL Tabular Form process :
    Let's say your master form is based on DEPT and your detail tabular form is based on EMP. Make sure the following things are configured:
    The DEPT insert/update DML process runs before the new tabular form PLSQL process. (ie) the new PL SQL Tabular Form Process that you create should be inbetween Automatic Row Processing(DML) and Multi Row Update Process , so create the new Tabular Form Pl SQL process with a sequence number inbetween these two Processes.
    Make sure you choose Tabular form while creating this PL SQL process.
    The new tabular form PL/SQL process executes the following as the source
       :DEPTNO := :P1_DEPTNO;
    Where DEPTNO is the Foreign Key column in the Tabular Form that links the Primary Key Item P1_DEPTNO of the Master Form.
    Finally this new PL SQL process conditionally runs when DEPTNO is null, so you need to add the following condition to the process:
    The final step to accomplish in creating both the Master and Detail records at the same time is to make a change in the condition of the Multi Row Update Process. :request in ('SAVE','CREATE') or :request like 'GET_NEXT%' or :request like 'GET_PREV%'
    -We make this change so that records get inserted into the Detail table when we click the ‘’Create” button.
    Now you can Run your page and create both the Master and Detail records at the same time.
    Thanks and Regards,
    Madonna

  • How to insert  new records in Master and detail Forms.

    Hi,
    I am having trouble inserting values in both master and detail view at the same time. The scenarios is I have a Dept Table (View Object-VO1) and Employee Table(View Object -VO2) both linked with a foreign key, as per Default HR schema in Oracle DB XE.
    Now I want to insert new record in both Dept(VO1) and EMP(VO2) table via a New page say ( Page2 ). There is a button on Page1 with button INSERT .I can only drag-drop "CreateInsert" operation on that button for VO1 or VO2. So only text box for Dept records are enable to insert data but not Emp records. Is there a way I can insert data in both the tables at the sametime??
    Thanks,
    MB

    Hi MuradRabbani,
    You can programmatically call both createInsert Operations,
    Add to your pageDef both CreateInsert Operations.
    Create a button tha will call insert method from Master (VO1) and then call insert method for Detail (VO2)
    Here is an Example code of calling the operations:
    DCBindingContainer dcb = ADFUtils.getDCBindingContainer(); //you need ADFUtils.java and JSFUtils.java classes. You can find them in the sample applications in your JDeveloper.
    OperationBinding oper = dcb.getOperationBinding("CreateInsertVO1");
    oper.execute();
    -----------------NOTE: at this point you should have set values that compine the ViewLink on the master in order the detail will know where to link the new record there are many ways to do it.
    As an approach try to overrdi the create Method on the in the ViewRowImpl of your Master vo (VO1)
    e.g.
    @Override
    protected void create(AttributeList attributeList) {
    //before
    attributeList.setAttribute("NameOfAttribute", valueHere);
    super.create(attributeList);
    After that you should call the operation for your detail VO2
    e.g.
    DCBindingContainer dcb = ADFUtils.getDCBindingContainer();
    OperationBinding oper = dcb.getOperationBinding("CreateInsertVO2");
    oper.execute();
    The detail record will now have the values from your master automatically.
    Regards,
    Dimitris.

  • MySQL Sytax error with master and detail pages

    Master and Detail pages.
    I get an SQL error when I click on an Item in the Master
    page.
    “You have an error in your SQL syntax; check the manual
    that corresponds to your MySQL server version for the right syntax
    to use near 'ID = 16 LIMIT 0, 10' at line 1 “
    If I try to open the detail page I get
    “You have an error in your SQL syntax; check the manual
    that corresponds to your MySQL server version for the right syntax
    to use near 'ID = -1 LIMIT 0, 10' at line 1 “
    I created this pair by simply clicking on Insert/data object/
    master detail page.
    I have tried this various ways, but always get the same
    result.
    Is there a bug in CS3?

    Sorry I have solved it myself.
    I had accidentally put a space in a table header in the mySQL
    data bank.
    All works well now.

  • Connect third ViewObject to 2 ViewObjects (Master And Detail) via ViewLink

    I have three ViewObjects; 1 Master 1 Detail connected with a ViewLink; i have a third Read-Only (SQL Based) ViewObject which can only be resolved by two bind variables. But the 1st bind variable is on the Master and the second is on the Detail. How can I connect the third ViewLInk to the Master and Detail ViewObjects?

    I dropped both viewobjects as read-only tables and they both have the rangesize set to -1.
    I think I made myself a bit unclear when asking my question. I do not want a "normal" master-detail view in my jsp where you see one masterrow and all the detailrows. I want my page to show all the masterrows with all their corresponding detail rows listed under the master row.
    The pseudocode may look like this:
    for each row in MasterViewObject loop
    <<display data in MasterViewObject>>
    for each row in DetailViewObject loop
    <<display data in DetailViewObject>>
    end inner loop
    end outer loop
    As you see I have a double loop here. Is somehing like this possible without "manually" doing all the stuff?
    Thanx
    Tom

  • Master form -detail table

    Hi,
    Jdeveloper Verison: 11.1.2.1.0
    I m creating a master detail form .
    hr_feedback_mt
    id_feedback
    employee_no
    id_training_program
    trainer
    location
    attended date
    hr_ratings_tt
    id_feedback
    id_question
    rating
    hr_questions_mt
    id_question
    question
    I have created master EO and VO for hr_feedback_mt, hr_ratings_tt. created associations and viewlink between EO and VO's.
    On the form I have dragged the master VO from the data control as form, and detial VO as editable  table.
    On master from i clicked createinsert operation and filled the attributes. on details table, i click on createinsert operation, it creates on row in the detail table.
    But actually when i click on createinsert operation of detail table, i need to display all the questions(rows and the ratings so that user fills all the questions.
    on commit master and detail should be saved into the database.
    How to achieve detail table to show all the questions on one click of createinsert operation and user fills all the questions and ratings.

    There is no automatic insert of all possible question in the detail table. You have to do this by hand in a beam method or better in a service method in the Application module or VO.
    Timo

  • Pagination for Master Form, Detail Table

    Hi,
    I am using JDev11.1.2.1.0
    I am creating a page having master detail relationship (master as a form and detail as a table). On click of First, Prev, Next, Last pagination button of master should change the data and refresh child table data.
    So created a Master VO & Child VO joined with View Link and dragged into page as Master form, Detail table. But during pagination, NEXT works once, then it seems to stop there. LAST works and FIRST & PREVIOUS seem to both go to the first record.
    Can anyone suggest me when I went wrong.

    Yes Frank, its st. forward use case. I tired with master table with detail table works fine but master form with details table behaviors differently.
    Below snippet of code in JSPX page master form detail table as shown below :
    <af:panelFormLayout id="pfl6">
    <af:panelLabelAndMessage label="Name:" id="plam1">
    <af:outputText value="#{bindings.EMP_NAME.inputValue}" id="ot2"/>
    </af:panelLabelAndMessage>
    <af:panelGroupLayout id="pgl15" layout="horizontal">
    <af:commandButton text="First"
    disabled="#{!bindings.First.enabled}"
    partialSubmit="true" id="cb1"
    actionListener="#{bindings.First.execute}"/>
    <af:commandButton text="Previous"
    disabled="#{!bindings.Previous.enabled}"
    partialSubmit="true" id="cb2"
    actionListener="#{bindings.Previous.execute}"/>
    <af:commandButton text="Next"
    disabled="#{!bindings.Next.enabled}"
    partialSubmit="true" id="cb3"
    actionListener="#{bindings.Next.execute}"/>
    <af:commandButton text="Last"
    disabled="#{!bindings.Last.enabled}"
    partialSubmit="true" id="cb4"
    actionListener="#{bindings.Last.execute}"/>
    </af:panelGroupLayout>
    </af:panelFormLayout>
    <af:table rows="#{bindings.EmpSchemesViewObj1.rangeSize}"
    fetchSize="#{bindings.EmpSchemesViewObj1.rangeSize}"
    emptyText="#{bindings.EmpSchemesViewObj1.viewable ? 'No data to display.' : 'Access Denied.'}"
    var="row" styleClass="AFStretchWidth" autoHeightRows="5"
    columnStretching="column:c2"
    value="#{bindings.EmpSchemesViewObj1.collectionModel}"
    rowBandingInterval="0" contentDelivery="immediate"
    selectedRowKeys="#{bindings.EmpSchemesViewObj1.collectionModel.selectedRow}"
    selectionListener="#{bindings.EmpSchemesViewObj1.collectionModel.makeCurrent}"
    rowSelection="single" id="t1"
    partialTriggers="::cb1 ::cb2 ::cb3 ::cb4">
    <af:column headerText="#{msg.LONG_NM}"
    sortProperty="#{bindings.EmpSchemesViewObj1.hints.REGISTERED_NAME.name}"
    sortable="false" id="c1">
    <af:outputText value="#{row.REGISTERED_NAME}" id="ot9"/>
    </af:column>
    </af:table>
    Edited by: 879073 on Jan 22, 2013 3:36 AM

Maybe you are looking for

  • How do i add my airport extreme to my DSL WIFI Modem to expand my network

    I have a DSL MODEM with WIFI. It replaced my Airport Extreme as a router. How can I use the Airport Extreme in conjunction to expand my wifi service through out my house. AIRPORT EXTREME MODELA 1354 Modem is a Qwest PK5000z WPA-WPA2 PERSONAL MAC BOOK

  • Firefox using/changing printer preferences in Windows 7 Pro

    I have a workstation printing to a Kyocera copying machine that is on the network. When she prints from Firefox, it sends the print request to the wrong cassette. I have reset the printer information in about:config. Removed and re-installed the netw

  • Ovi sign in Issue on E5

    Hi all I have a major issue on usage of OVI store on my E5 , every time I enter my username & password it just gives me a POP UP " Invalid Username " .....but the same ID works on my PC.....Appreciate ur inputs on this

  • Unable to duplicate subtree E1EDK14 for ORDERS05

    Hi, For File to Idoc flow, my mapping requirement is For E1EDK14, ORGID/QUALF=012           ORGID = ORDERTYPE ORGID/QUALF=008           ORGID = SALESORG For that, I have to duplicate subtree E1EDK14 and map it from the source field. But when I save i

  • Running .bat files

    Hello, I recently uninstalled my Google Chrome to then reinstall it. Ever since, I have .bat files that used to open in Windows Explorer that now open new tabs in Google Chrome. How do I stop that from happening? I want the .bat files to open in Wind