Page Processing with multiple tables

Hello to all sql experts!
I have been successful in inserting a row into a table and creating the PK using Page Processing. The parent table is called Facility.
I used the following sql to insert a row into the table and now need to add data to the child tables.
Parent table==>
INSERT INTO FACILITY(fac_pk, fac_type, fac_name, street1, city, state, zip, state_or_tribe, tribe_yn)
VALUES (FAC_SEQ.nextval,
NVL(:P211_FAC_TYPE, 'N'),
NVL(:P211_FAC_NAME,'No Data'),
NVL(:P211_STREET1,'No Data'),
NVL(:P211_CITY, 'No Data'),
NVL(:P211_STATE,'CA'),
NVL(:P211_ZIP,'00000'),
NVL(:P211_STATE_OR_TRIBE,'CA'),
NVL(:P211_TRIBE_YN,'N'));
Child table == >
INSERT INTO CONTACT(cnt_pk, fullname, street1, city, state, zip, phone, title)
VALUES (CNT_SEQ.nextval,
NVL(:P36_FULLNAME, 'No Data'),
NVL(:P36_STREET1,'No Data'),
NVL(:P36_CITY, 'No Data'),
NVL(:P36_STATE,'CA'),
NVL(:P36_ZIP,'00000'),
NVL(:P36_PHONE,'555-1212'),
NVL(:P36_TITLE,'No Data'));
My Questions:
1. How do I reference the Facility PK that was already created?
2. If I have several child tables where I want to insert a row, is the sql the same as above?
I did run the separate Insert sql for Contact table, but all it did was create a new row, but no link to the facility record.
Thanks for looking at this. I am new to sql and want to use the PL/SQL to process the inserts into the tables.
Judy

hi judy
check this forum
Re: How to insert into 2 tables from the same page (with one button  link)
you will have an idea
think, this help u better.
bye
srikavi

Similar Messages

  • How to build a form with multiple tables in oracle application express

    Hi everyone,
    I have got problem in building a form with multiple tables.I have a main table with (20) columns and this main table is related to the other tables with the primary key-foreign key relation ship.My requirement is i have to build a form which has fields from many tables and all the fields are related to the main table using (ID) column.In that form if i enter ID field i have to get information from differnt tables.
    Please help me to solve this (building a form with mutiple tables)
    Thank you
    sans

    Sans,
    I am no Apex expert, but with a situation as "complex" as yours, have you thought about creating a VIEW that joins these 7/8 tables, placing an INSTEAD OF trigger on that view to do all the business logic in the database, and base your application on the view?
    This is the "thick-database" approach that has been gaining momentum of late. The idea is to put your business logic in the database wherever possible, and let the application (Form, Apex, J2EE, whatever) concentrate on UI issues,

  • RegionRenderer encodeAll The region component with id: pt1:r1 has detected a page fragment with multiple root components. Fragments with more than one root component may not display correctly in a region and may have a negative impact on performance.

    Hi,
    I am using JDEV 11.1.2.1.0
    I am getting the following error :-
    <RegionRenderer> <encodeAll> The region component with id: pt1:r1 has detected a page fragment with multiple root components. Fragments with more than one root component may not display correctly in a region and may have a negative impact on performance. It is recommended that you restructure the page fragment to have a single root component.
    Piece of code is for region is:-
       <f:facet name="second">
                                                <af:panelStretchLayout id="pa1"
                                                                       binding="#{backingBeanScope.Assign.pa1}">
                                                    <f:facet name="center">
                                                        <af:region value="#{bindings.tfdAssignGraph1.regionModel}" id="r1"
                                                                   binding="#{backingBeanScope.Assign.r1}"/>
                                                    </f:facet>
                                                </af:panelStretchLayout>
                                            </f:facet>
    How do I resolve it ?
    Thanks,

    Hi,
    I see at least 3 errors
    1. <RegionRenderer> <encodeAll> The region component with id: pt1:r1 has detected a page fragment with multiple root components.
    the page fragment should only have a single component under the jsp:root tag. If you see more than one, wrap them in e.g. an af:panelGroupLayout or af:group component
    2. SAPFunction.jspx/.xml" has an invalid character ".".
    check the document (you can open it in JDeveloper if the customization was a seeded one. Seems that editing this file smething has gone bad
    3. The expression "#{bindings..regionModel}" (that was specified for the RegionModel "value" attribute of the region component with id "pePanel") evaluated to null.
    "pageeditorpanel" does seem to be missing in the PageDef file of the page holding the region
    Frank

  • "detected a page fragment with multiple root components" warning

    I am getting a warning on the standalone WLS when I run my page that contains a taskflow as region. I am using a page fragment in my taskflow.
    <Warning> <oracle.adfinternal.view.faces.renderkit.rich.RegionRenderer> <ADF_FACES-60099> <The region component with id: ptMain:r1 has detected a page fragment with multiple root components. Fragments with more than one root component may not display correctly in a region and may have a negative impact on performance. It is recommended that you restructure the page fragment to have a single root component.>
    The warning states the obvious, I have everything within a panelheader in my page fragment. Also, I do not get the warning on the integrated WLS. Any ideas as to why this warning is still popping up in the log? I am using JDev 11.1.1.3.
    Thanks,
    Jessica

    Thank you for responding. I do not have any popups. I do, however, have another region nested within this fragment ( have this warning on another fragment that doesn't have a nested region though). Here is the code for my fragment.
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
    xmlns:f="http://java.sun.com/jsf/core">
    <af:panelHeader text="Pawn"
    binding="#{backingBeanScope.backing_Fragments_PawnSearch.ph1}"
    id="ph1" type="default">
    <af:panelFormLayout id="pfl2">
    <af:panelSplitter binding="#{backingBeanScope.backing_Fragments_PawnSearch.ps1}"
    id="ps1" orientation="vertical" splitterPosition="62"
    inlineStyle="width:775px; height:660px;">
    <f:facet name="first">
    <af:panelBox text="Search #{bindings.agency.inputValue} Data to Update"
    binding="#{backingBeanScope.backing_Fragments_PawnSearch.pb1}"
    id="pb1">
    <f:facet name="toolbar"/>
    <af:panelGroupLayout id="pgl3" layout="horizontal">
    <af:inputText value="#{bindings.control_number.inputValue}"
    label="Control Number" required="true"
    columns="#{bindings.control_number.hints.displayWidth}"
    maximumLength="#{bindings.control_number.hints.precision}"
    shortDesc="#{bindings.control_number.hints.tooltip}"
    id="it1">
    <f:validator binding="#{bindings.control_number.validator}"/>
    </af:inputText>
    <af:inputDate value="#{bindings.trans_date.inputValue}"
    label="Date" required="true"
    shortDesc="#{bindings.trans_date.hints.tooltip}"
    id="id1">
    <f:validator binding="#{bindings.trans_date.validator}"/>
    <af:convertDateTime pattern="#{bindings.trans_date.format}"/>
    </af:inputDate>
    <af:inputText value="#{bindings.agency.inputValue}" simple="true"
    required="#{bindings.agency.hints.mandatory}"
    columns="#{bindings.agency.hints.displayWidth}"
    maximumLength="#{bindings.agency.hints.precision}"
    shortDesc="#{bindings.agency.hints.tooltip}"
    binding="#{backingBeanScope.backing_Fragments_PawnSearch.it2}"
    id="it2" visible="false">
    <f:validator binding="#{bindings.agency.validator}"/>
    </af:inputText>
    <af:commandButton actionListener="#{bindings.ExecuteWithParams.execute}"
    text="Search"
    disabled="#{!bindings.ExecuteWithParams.enabled}"
    id="cb5"
    returnListener="#{backingBeanScope.backing_Fragments_PawnSearch.refreshPage}"
    action="#{backingBeanScope.backing_Fragments_PawnSearch.RenderMe}">
    <af:setActionListener from="#{bindings.PawnItemView1Iterator.currentRowKeyString}"
    to="#{requestScope.pawnkey}"/>
    </af:commandButton>
    <af:spacer width="10" height="10"
    binding="#{backingBeanScope.backing_Fragments_PawnSearch.s1}"
    id="s1"/>
    <af:goButton text="Clear Values and Create New" id="gb1"
    destination="index.jspx"
    rendered="#{backingBeanScope.backing_Fragments_PawnSearch.saveButtonRendered}"/>
    </af:panelGroupLayout>
    </af:panelBox>
    </f:facet>
    <f:facet name="second">
    <af:panelGroupLayout binding="#{backingBeanScope.backing_Fragments_PawnSearch.pgl4}"
    id="pgl4" layout="scroll" partialTriggers=""
    visible="true">
    <af:panelGroupLayout binding="#{backingBeanScope.backing_Fragments_PawnSearch.pgl6}"
    id="pgl6" inlineStyle="width:775px;"
    visible="#{backingBeanScope.backing_Fragments_PawnSearch.renderTF}">
    <af:region value="#{bindings.PawnEntryFormTF1.regionModel}"
    id="r1" inlineStyle="width:750px;"/>
    </af:panelGroupLayout>
    <af:panelGroupLayout binding="#{backingBeanScope.backing_Fragments_PawnSearch.pgl5}"
    id="pgl5" layout="horizontal"
    visible="#{backingBeanScope.backing_Fragments_PawnSearch.renderMessage}">
    <af:outputFormatted value="No #{bindings.agency.inputValue} Pawn data matching the Control Number and Transaction Date from above."
    binding="#{backingBeanScope.backing_Fragments_PawnSearch.of1}"
    id="of1"
    inlineStyle="font-weight:bolder; font-size:small;"/>
    <af:spacer width="10" height="10"
    binding="#{backingBeanScope.backing_Fragments_PawnSearch.s2}"
    id="s2"/>
    <af:goButton text="Clear Search and Start Again"
    binding="#{backingBeanScope.backing_Fragments_PawnSearch.gb2}"
    id="gb2" destination="index.jspx"/>
    </af:panelGroupLayout>
    </af:panelGroupLayout>
    </f:facet>
    </af:panelSplitter>
    </af:panelFormLayout>
    </af:panelHeader>
    <!--oracle-jdev-comment:auto-binding-backing-bean-name:backing_Fragments_PawnSearch-->
    </jsp:root>

  • Create View table with multiple table

    I want to create View table with relation with multiple tables.
    for ex
    table 1
    mrnno
    mrnqty
    table 2
    mrnno
    issqty
    table 3
    mrnno
    retqty
    want to create view table where i can see the sum (mrnqty), sum(issqty),sum(retqty) group by mrnno
    sandy

    Hi
    CREATE OR REPLACE FORCE VIEW my_view AS
    WITH t1 AS
    (SELECT mrnno,
                      SUM(mrnqty) sum1
    FROM table_1
    GROUP BY mrnno),
    t2 AS
    (SELECT mrnno,
                      SUM(issqty) sum2
    FROM table_2
    GROUP BY mrnno),
    t3AS
    (SELECT mrnno,
                      SUM(retqty) sum3
    FROM table_3
    GROUP BY mrnno)
    SELECT mrnno,
                    sum1,
                   sum2,
                   sum3
    FROM t1,t2,t3
    WHERE t1.mrnno = t2.mrnno
    AND       t1.mrnno = t3.mrnnoCheers
    Ben
    http://www.munkyben.wordpress.com
    Don't forget to mark replies helpful or correct ;)

  • BaseTableName blank when calling GetSchema on a query with multiple tables

    I am using ODP.NET 11.2.0.3.0 and when calling GetSchemaTable on a DataReader that contains a join the returned SchemaTable has the BaseTableName and BaseColumnName fields blank - this is different than what I see with the Oracle OLE DB Provider and with how SQL Server's native provider works. I can't find any discussion of this - is this on purpose or is it a bug? why does the available schema information vary so drastically between a single table query and a query with multiple tables joined?
    Thanks,
    Bryan Hinton

    Hi Bryan,
    I am also facing the same issue. Did u find any work around or any suggestions will be well appreciated.
    Thanks,
    Naresh.

  • Create opaque view in OBIEE with multiple tables

    Hi,
    I need some help with the opaque view since i have never created it in past. I want to create an opaque view which fetches data from multiple tables. Is it possible to do that ? Or is there any other alternate option available in OBIEE ? I read the following blog and other similar blogs on opaque views but could not find option to use it for query with multiple tables:
    Oracle Business Intelligence: Creating Opaque View in Physical Layer in OBIEE 10g
    Also can you please advice how to join two tables from different databases in OBIEE ?
    Kindly advice.
    Regards,
    Andy

    Hi Andy,
    As per my knowledge you can create Opaque View on one table at a time.Joining two tables from different databases yes we can create a report from multiple data sources.Check this
    Rittman Mead Consulting &amp;raquo; Blog Archive &amp;raquo; Reporting Against Multiple Datasources in OBIEE
    Mark if helps.
    Thanks,

  • Problem initiating process with multiple operations using HTTP/SOAP

    Hi,
    I have defined a process which has multiple operations. My process starts with a pick activity containing onMessage branches for each possible operation. When I initiate this service using the BPEL console, I choose one of the operations and everything works fine.
    However, when I initiate this process using an HTTP/SOAP web service call using JMeter, always the first branch is executed regardless of the message I send.
    My operations are document/literal. Due to some restrictions, I cannot define a SOAPAction for the operations. Could this be the problem? Is there a workaround for this? If this is not the problem, what could be the cause?
    I'm using version 10.1.2.1.
    Any help will be appreciated. Thanks in advance..

    hi i am using 10.1.3 and still i can not initiate a process with multiple operations. Is there anybody to tell if pick activity works fine and if there are some points to consider?
    If there is a problem is there any solution to make a process with multiple operations?

  • Wiki page layout with multiple rows in SharePoint 2013 foundation?

    We have a SharePoint 2013 foundation version and a requirement to create custom wiki pages with predefined templates. SharePoint provides template with header, footer and middle row out of which only middle row can have more than one column, we need more
    than that. Can anybody help us in achieving this?

    Thank you for your reply Inderjeet.<o:p></o:p>
    Actual problem is with wiki page custom templates, we have created some custom templates and they work fine, please refer below link for implementation
    details
    http://blog.hompus.nl/2012/06/07/provisioning-a-default-layout-and-content-when-adding-a-wiki-page/
    If we want to create a little complicated templates as shown below, we are finding it difficult with only one table provided by
    wiki layout. Can we add multiple table inside a template? if yes, how to do that? if not, how to create template like below.

  • How to set Page break in multiple tables ?

    Hi ,
    I have 3 tables in my SSRS report . 3 tables have different groups.
    All groups are showing in different excel tabs as expected. Also dynamically generating each tab name based on the group name .
    But 3 rd table group tab name not generating dynamically but taking 2nd table last group name .
    In below example Johnhancock is my last group of table 2. From first group of 3 rd table onwards it will showing as Johnhancock2, Johnhancock3, Johnhancock4 etc. ( Data is correct only issue with tab name )
    Note: I have used add a page break after  option for all 3 tables . Please suggest if I need to change any settings.

    Hi Kotim,
    According to your description, you have three tables in a report with page breaks between those tables. When you export this report as excel, you have set the worksheets names showing each group name. Now you find all tabs of the third table shows the last
    group name of the second table. Right?
    In Reporting Service, when we export a report to an excel file, if we add page breaks for the report manually, then the report will be exported into multiple worksheets based on page breaks, and the report page names determine the name of worksheets. For
    testing this scenario, we add page breaks between groups and tables, and put the group name into page name. It works fine when we export it to excel file. So we suggest you check the page name of the third table, make sure the page name is the group name of
    the third table. If possible, please post some other detail information about report design. Here we also have a blog for your reference:
    Report Design: Naming Excel Worksheets
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou (Pactera)

  • Help with multiple table joins

    I'm trying to limit the results of a query joining multiple tables. I have a main table, tbl_webrequests, and multiple tables with supporting information. The unique column for tbl_webrequests is reqID. There is another table, tbl_instructions, that holds all the instructions tied to each request. I join the tables using reqID.
    I'm trying to construct a page that has all of the records in tbl_webrequests. The problem I'm having is that with each request that has multiple instructions, I have multiple results because of the multiple instructions for one reqID. For now, all I want is the original instruction to display. Below is the original query, and below that is what I'm trying to get the query to do for each record in tbl_webrequest. Note that 319 is a random uniqueID in tbl_webrequests.
    SELECT
    DISTINCT W.reqID, W.dt_close, W.dt_due, W.subject, W.statusid, W.empID, W.priorityid, W.assigneeid, W.categoryid, W.url, W.hrs,
    W.closingNotes, W.mins, W.requestTypeID, I.instructions, I.instID
    from tbl_webrequests W left join
    (select reqID, instID, instructions from tbl_instructions) I on W.reqID = I.reqID
    ORDER BY I.instID asc;
    SELECT
    distinct I.instructions, I.instID, W.reqID, W.dt_close, W.dt_due, W.subject, W.statusid, W.empID, W.priorityid, W.assigneeid, W.categoryid, W.url, W.hrs,
    W.closingNotes, W.mins, W.requestTypeID
    from tbl_webrequests W left join
    (select reqID, instID, instructions from tbl_instructions where rowNum = 1 and reqid = 319 order by instID asc) I on W.reqID = I.reqID
    where W.reqID = 319
    ORDER BY I.instID asc;
    My question is, how do I pass the reqID as a variable into the join subquery so that the query returns only returns the first joined item in tbl_instructions for each record in tbl_webrequests?
    Any help is appreciated
    Thanks!

    Scrap the "DISTINCT" and try something like this:
    Select
           I.Instructions, I.Instid
         , W.Reqid, W.Dt_Close, W.Dt_Due, W.Subject, W.Statusid, W.Empid, W.Priorityid
         , W.Assigneeid, W.Categoryid, W.Url, W.Hrs, W.Closingnotes, W.Mins, W.Requesttypeid
      From Tbl_Webrequests W Left Join
         ( Select Reqid, Instid, Instructions
             From Tbl_Instructions I0
            Where Instid = (Select Min(Instid) From Tbl_Instructions I1
                             Where I1.Reqid = I0.Reqid)
         ) I On W.Reqid = I.Reqid
    Where W.Reqid = 319
    Order By I.Instid Asc;;)

  • Ability to query on all columns from a view with multiple tables

    I have view with 4 tables. view has about 50 columns.
    hypothetically, I want to build a form to give the user an ability to query on any of those 50 columns. user can search on one or more fields.
    what is the best way to write the query to retrieve the results without performance impact.
    please let me know if the question is not clear.

    If you want to permit them to query any of 10 fields with no restrictions, you could create 10 separate single-column indexes. The optimizer would have to try to pick the best of these indexes if you specified multiple search criteria. But since you have a view which presumably means that you've got multiple other indexes involved for the underlying join conditions, you'd probably want/need to combine the column lists of the indexes you're adding for searches with the indexes you've created for joins, which requires looking at the text of the view and figuring out the best way to optimize the 10 single-column searches. Of course, it is possible that the optimizer could chose to do something like a b-tree to bitmap conversion on multiple indexes which could allow it to use multiple independent indexes for your queries, but that's generally not ideal performance-wise.
    All this is a fancy way of saying that there probably isn't a cut and dried answer to your question. You need to figure out the queries you're trying to optimize (say, the 10 single-condition queries) and you need to figure out what set of indexes on the various underlying tables provides the best performance weighing those benefits against the cost on other side of maintenance during DML. Which is going to depend on the text of the view, the underlying tables, the existing indexes, etc.
    Justin

  • Best way to do a lookup with multiple tables

    Hello,
    I am looking for an example or how to do a lookup through ESB XSL transformation. What I am wanting to accomplish is something like below:
    I am reading in a flat file and then want to use a field in that file to do a lookup in multiple tables.
    i.e.
    Select c.customer_name
    from customers c, order_lines ol, order_headers oh
    where ol.customer_id = c.customer_id
    and ol.header_id = oh.header_id
    and oh.order_number = p_order_num;
    I know that there is the lookup-table function but didnt know if that would work with this scenario. Any suggestions are appreciated.
    Thanks,
    Jason
    Edited by: Colby J on Oct 21, 2008 11:13 AM

    Hello,
    I am looking for an example or how to do a lookup through ESB XSL transformation. What I am wanting to accomplish is something like below:
    I am reading in a flat file and then want to use a field in that file to do a lookup in multiple tables.
    i.e.
    Select c.customer_name
    from customers c, order_lines ol, order_headers oh
    where ol.customer_id = c.customer_id
    and ol.header_id = oh.header_id
    and oh.order_number = p_order_num;
    I know that there is the lookup-table function but didnt know if that would work with this scenario. Any suggestions are appreciated.
    Thanks,
    Jason
    Edited by: Colby J on Oct 21, 2008 11:13 AM

  • PO Error in Process with Multiple account assignment

    Hi ,
    I am working with Extended Classsic scenario.
    Problem is with PO with Multiple account assignement.
    There is only one user who is getting problem with one particular account assignement "CCC" - Cost Center RP.. . When PO gets created with this particular AAC , it goes into "Error in process" only for one user.
    In RZ20 it shows messsage as "Please enter quantity or percentage for account assignment" & "Distr. ind. and partial invoice ind. must be set f or multi acct. assgt.".
    On other hand , other users are able to order the PO with the same AAC without any error.
    What could be the reason behind this only for one user ?
    Regards,
    Sheetal

    Hi ,
    I have checked it intially and both are identical.
    Initialy the problem was, user had entered 128 times AA line items  ( added & deleted ) in the PO while in the SC it was having only 64.... Our system accepts line items till 99 , so i asked him to delete the items above 99 ..
    So after that POs error has gone and it went for approval..
    But after approval it again went into error in process
    Sheetal

  • Page built with a table does not display well in Internet Explorer.

    In Chrome and Safari it appears correctly (items are left justified in each column) while in Internet Explorer all columns are centered. Website is www.eventpowerli.com and it is the home page where we have the issue. I am new to building websites so please bear with me on this question: -) Let me know if you need addnl info. From what I have seen thus far, IE is a real problem child for more than one reason

    Honestly do not use tables for your site layouts. There is a variety of box model issues and more with IE, especially with using tables. And it is really bad form to design that way anyway.
    Tablless web design using CSS is the way it should be done and if you conform to web standards and CSS standards and best practises you will have less issues.
    http://girlswhogeek.com/tutorials/2006/create-a-tableless-css-layout Just as a basic example.

Maybe you are looking for

  • RRI - Jump query, unable to pass the variable value from source to target

    Hi,     I've a source query which has a variable on 0vendor, from this query i jump to another query for which i want to pass the this variable value, in the target query i've vendor in free characteristics (no filter or variable in there), and in RS

  • Could not save *.* because file is in use or was left open...

    OK, I mentioned this when it happened with .eps files, and rather than get a single useful tip(Except for 'choose a new file name'), I got a series of responses from people telling me how I should be saving in .tiff and 'eps files aren't any good any

  • C++ Runtime Error when trying to open Adobe Acrobat

    When I try to launch Adobe Acrobat 6.0, I get the following error: Runtime Error! This application has requested the Runtime to terminate it in an unusual way. I've tried every fix I could fin on the Web including reinstalling the program. Does anyon

  • AC_FL_RunContent: 'noborder' setting

    Hi, I'm using Flash 4 (just making a few simple Flash animations) and AC_RunActiveContent.js. When I use 100% (of a DIV, not of the screen) instead of 900px I can see the objects outside the animation (which is 900px to 217px). So I inserted AC_FL_Ru

  • Documentation with examples for OO ABAP

    Hi All out there, I want to learn object oriented ABAP. can you send me some documentation along with examples to [email protected] Thnanks in Advance. Ashutosh.