3 Tier Relational DB's and Dynamic Tables

I have three tables which I shall, for ease, call A, B and C.
B is relational to A
C is relational to B
A1 - B1 - C1
C2
B2 - C3
C4
A2
A3 - B3 - C5
B4
B5 - C6
C7
C8
I have no trouble creating recordset links for one or the
other
SELECT A.*, B.*
FROM A INNER JOIN B ON A.AID = B.BAID
WHERE etc... etc......
Similarly, I can create a recordset for the secondary link..
SELECT B.*, C.*
FROM B INNER JOIN C ON B.BID = C.CBID
WHERE etc... etc......
What I am trying to acheive however is a recordset with a 3
tier relationship and I can't figure the syntax.
Somthing like...
SELECT A.*, B.*, C.*
FROM A INNER JOIN B ON A.AID = B.BAID, B INNER JOIN C ON
B.AID = C.BAID
WHERE etc... etc...... (This doesn't work!)
This would then result in a dynamic table with (B and C) in
the same row as it propogates.
Eventually, what I want to achieve is a simple attachment
symbol on each row of B, based on something like....
<?php if (C,TotalRecords <> NULL) { ?>
<a href="/linkedattachments.php?BID=<?php echo
$row_recordsetB['BID']; ?>" target="_blank">
<img src="fileicon.gif" alt="Click to see
attachments"></a>
<?php } ?>
Am I going about this the right way? Is this even clear?
lol

"RichardODreamweaver" <[email protected]>
wrote in message
news:[email protected]...
> I have three tables which I shall, for ease, call A, B
and C.
>
> B is relational to A
>
> C is relational to B
>
> A1 - B1 - C1
> C2
> B2 - C3
> C4
> A2
> A3 - B3 - C5
> B4
> B5 - C6
> C7
> C8
>
>
> I have no trouble creating recordset links for one or
the other
>
> SELECT A.*, B.*
> FROM A INNER JOIN B ON A.AID = B.BAID
> WHERE etc... etc......
>
> Similarly, I can create a recordset for the secondary
link..
>
> SELECT B.*, C.*
> FROM B INNER JOIN C ON B.BID = C.CBID
> WHERE etc... etc......
>
> What I am trying to acheive however is a recordset with
a 3 tier
> relationship
> and I can't figure the syntax.
>
> Somthing like...
>
> SELECT A.*, B.*, C.*
> FROM A INNER JOIN B ON A.AID = B.BAID, B INNER JOIN C ON
B.AID = C.BAID
> WHERE etc... etc...... (This doesn't work!)
that's almost right
SELECT A.*, B.*, C.*
FROM ((A INNER JOIN B ON A.AID = B.BAID) INNER JOIN C ON
B.AID = C.BAID)
WHERE etc... etc......
I've added parentheses to show how the next join will operate
on the first,
the first join results in a relation of table a and b,
you then join this "virtual table" to the third.
> This would then result in a dynamic table with (B and C)
in the same row
> as it
> propogates.
>
> Eventually, what I want to achieve is a simple
attachment symbol on each
> row
> of B, based on something like....
For the count to work with records that have no children you
have to employ
a LEFT join to return records from the RIGHT table even if no
record on the
LEFT side matches.
SELECT A.*, B.*, COUNT(c.CAID) AS CAID_COUNT
FROM ((A INNER JOIN B ON A.AID = B.BAID) LEFT JOIN C ON B.AID
= C.BAID)
WHERE etc... etc......
> <?php if (C,TotalRecords <> NULL) { ?>
> <a href="/linkedattachments.php?BID=<?php echo
$row_recordsetB['BID']; ?>"
> target="_blank">
> <img src="fileicon.gif" alt="Click to see
attachments"></a>
> <?php } ?>
>
> Am I going about this the right way? Is this even clear?
lol
>

Similar Messages

  • What does mean You can include static and dynamic tables into a Smart Form?

    Hi guys,
    If you check the official documentation for Smart forms in the Internet you will read that the initial pharagraphs of the text tell you "Tables - You can include static and dynamic tables into a Smart Form. Dynamic tables enable you to display tables whose size is determined only at the moment of their output by the number of the table items to be displayed". The link is the following: http://help.sap.com/saphelp_nw04/helpdata/en/a5/de6838abce021ae10000009b38f842/frameset.htm
    I was wondering if this means that I can use field symbols with dynamical number of columns to print a smart form. Because it would be great since the customer wanted a dynamical report depending on the week day it was (If Monday, there was only 12 columns, but if Friday, it will be 52 columns (1 column more for every day elapsed in the current week)). I had to create 5 different forms, but I think using field symbols I had spent less effort. Do you know if it is really possible? If not, then what does mean "You can include static and dynamic tables into a Smart Form"?
    Thank you in advance

    Hi ,
    The concept of static and dynamic tables in smartforms, means you can use template- ( static table as no of rows and columns is fixed). Also you can use table- dynamic as the no of rows will depend on your line items.
    Hope this will help you to close this thread.
    Also, try to find this answer in posted forums. Creating a new forum everytime just increases the network traffic. So please try to avoid it.
    Regards,
    Vinit

  • Relation between Eban and Erev tables

    Hi,
       What is the Relation between Eban and Erev tables?
    Thanks and Regards,
    Parvatha Reddy

    Hi,
    if you have activated version management for purchase requisitions (spro - mm - purchasing - version mgmt - set up ver mgmt for PR), then if any changes are made to the fields as specified in the customizing, then an entry is made in EREV table. EBAN is the pur. reqn table.
    Hope it answers your query.
    Regards,
    Vivek

  • Relation between BKPF and EKBE table for reversing document?

    Is there any relation between BKPF and EKBE table for reversing document when STBLG is blank in BKPF.
    AND
    How to differentiate Old Accounting document / Reverse document / New document when in BKPF-STBLG is blank for all three document and BKPF-XBLNR are same for all.

    Hi Varun,
    Table Document no (BKPF-BELNR) is link between Material document no (EKBE-BELNR). If you are looking for validating Material reversal document then please use following logic for your requirement.
    Material Document (MBLNR) & Material Document Year (MJAHR). Pass material document (MBLNR) to MSEG-SMBLN to read MSEG-MBLNR with MSEG-MJAHR to MSEG-SJAHR, if record found delete both the documents i.e. MSEG-SMBLN & MSEG-MBLNR (donu2019t consider these documents in the logic) and display Material Document No. (MSEG-MBLNR)
    Regards,
    Santosh

  • Relation between vbuk and vbup tables?

    relation between vbuk and vbup tables?
    regards phani

    Dear Phani,
    http://help.sap.com/saphelp_erp2005/helpdata/en/70/a7853478616434e10000009b38f83b/frameset.htm
    VBUK .... Sales Document: Header Status and Administrative Data
    VBUP ....Sales Document: Item Status
    VBUK contains header status where as VBUP contains individual item status of the header. Similar to VBAK and ABAP where VBAK contains Sales Document header data and VBAP contains Sales document item data.
    Hope this will help.
    Regards,
    Naveen.

  • User Entered - Required and dynamic table

    Hi all,
    I am using LiveCycle Designer 7.1, and I need a little help with scripting. In my form I have a page with three major questions. underneath each questions I have the sentence "If the answer is YES:" and some questions that relate to major question above them. My task is if the user choose YES in the major question all the questions that related to the major should become "User Entered - Required". How can I do That?
    Secondly, In the same form I have a page with dynamic table. The last column of the table is percentage, and I need that column values won't cross the 100%. Please help me
    Thanks in advance
    Idan

    I believe the intent is to warn instead of annoy the user with repeated notices that a required field hasn't been filled (which is why it doesn't fire on subsequent tabbing).
    The Empty Message should be displayed whenever the value of the required field goes from something to nothing (e.g. the value is currently set to "asdf" and you remove the value and tab out) which means that simply tabbing in and out of the required field without changing its value (whether or not it had a value in the first place) wouldn't trigger the Empty Message to be displayed. It should
    always be displayed, however, whenever you attempt to
    submit the form if the required field has no value (and Acrobat won't let you submit the form until all required fields have been filled).
    Stefan
    Adobe Systems

  • How to create dynamic View Object and Dynamic Table

    Dear ll
    I want to create a dynamic view object and display the output in a dynamic table on the page.
    I am using Jdeveloper 12c "Studio Edition Version 12.1.2.0.0"
    This what I did:
    1- I created a read only view object with this query "Select sysdate from dual"
    2- I added this View object to the application module
    3- I created a new method that change the query of this View object at runtime
        public void changeVoQuery(String dbViewName) {
            String sqlstm = "Select * From " + dbViewName;
            ViewObject dynamicVo = this.findViewObject("DynamicVo");
            if (dynamicVo != null) {
                dynamicVo.remove();
            dynamicVo = this.createViewObjectFromQueryStmt("DynamicVo", sqlstm);
            dynamicVo.executeQuery();
    4- I run the application module for testing the method and I passed "Scott.Emp" as a parameter and the result was Success
    5- Now I want to show the result of the view on the page, so I draged and dropped the method from the data control as a parameter form
    6- I dragged and dropped the view Object "DynamicVo" as a table and I choose "generate Column Dynamically at runtime". This is the page source
    <af:panelHeader text="#{viewcontrollerBundle.SELECT_DOCUMTN_TYPE}" id="ph1">
            <af:panelFormLayout id="pfl1">
                <af:inputText value="#{bindings.dbViewName.inputValue}" label="#{bindings.dbViewName.hints.label}"
                              required="#{bindings.dbViewName.hints.mandatory}"
                              columns="#{bindings.dbViewName.hints.displayWidth}"
                              maximumLength="#{bindings.dbViewName.hints.precision}"
                              shortDesc="#{bindings.dbViewName.hints.tooltip}" id="it1">
                    <f:validator binding="#{bindings.dbViewName.validator}"/>
                </af:inputText>
                <af:button actionListener="#{bindings.changeVoQuery.execute}" text="changeVoQuery"
                           disabled="#{!bindings.changeVoQuery.enabled}" id="b1"/>
            </af:panelFormLayout>
        </af:panelHeader>
        <af:table value="#{bindings.DynamicVo.collectionModel}" var="row" rows="#{bindings.DynamicVo.rangeSize}"
                  emptyText="#{bindings.DynamicVo.viewable ? 'No data to display.' : 'Access Denied.'}"
                  rowBandingInterval="0" selectedRowKeys="#{bindings.DynamicVo.collectionModel.selectedRow}"
                  selectionListener="#{bindings.DynamicVo.collectionModel.makeCurrent}" rowSelection="single"
                  fetchSize="#{bindings.DynamicVo.rangeSize}" filterModel="#{bindings.DynamicVoQuery.queryDescriptor}"
                  queryListener="#{bindings.DynamicVoQuery.processQuery}" filterVisible="true" varStatus="vs" id="t1"
                  partialTriggers="::b1">
            <af:iterator id="i1" value="#{bindings.DynamicVo.attributesModel.attributes}" var="column">
                <af:column headerText="#{column.label}" sortProperty="#{column.name}" sortable="true" filterable="true"
                           id="c1">
                    <af:dynamicComponent id="d1" attributeModel="#{column}"
                                         value="#{row.bindings[column.name].inputValue}"/>
                </af:column>
            </af:iterator>
        </af:table>
    when I run the page this error is occured
    <Nov 13, 2013 2:51:58 PM AST> <Error> <oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter> <BEA-000000> <ADF_FACES-60096:Server Exception during PPR, #1
    javax.el.ELException: java.lang.NullPointerException
    Caused By: java.lang.NullPointerException
    Can any body help me please
    thanks

    Have you seen Shay's video https://blogs.oracle.com/shay/entry/adf_faces_dynamic_tags_-_for_a
    All you have to do is to use the dynamic table to get your result.
    Timo

  • I am stuck in FIELD-SYMBOLS and dynamic tables.

    Hi guys,
                I am trying to create dynamic table. My requirement is as follows--
    I have to display grid layout report in depending on given input.
    In input i have fields for DC and STORE.
    In output i have to display columns depending on number of DC and STORE paased in input.
    For example if in input, i have 2 DCs DC01 and DC02 and in STs i have say 1 input - ST01
    then in outpt grid report there will be 3 columns.
    So my columns to be displayed depends on number of input values given while running it.
    I am trying to use dynamic table.
    My output report contains fields from different table...so i cant use
    FIELD-SYMBOLS: <DYN_TABLE> TYPE STANDARD TABLE
    instead i m trying to use
    FIELD-SYMBOLS: <DYN_TABLE> LIKE T_ARTMAS  "T_ARTMAS is declared as types : begin of....end of .... .
    but it is giviing an error in following form
    FORM CREATE_DYNAMIC_ITAB.
    Create dynamic internal table and assign to FS
      CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
        EXPORTING
          IT_FIELDCATALOG = IFC
        IMPORTING
          EP_TABLE        = DY_TABLE.
      ASSIGN DY_TABLE->* TO <DYN_TABLE>.
    Create dynamic work area and assign to FS
      CREATE DATA DY_LINE LIKE LINE OF <DYN_TABLE>........error on this line.
      ASSIGN DY_LINE->* TO <DYN_WA>.
    ENDFORM.                    "create_dynamic_itab
    saying "<DYN_TABLE>" is not an internal table - the "OCCURS n" specification is missing.          
    Kindly help me...
    thx in advance...

    Hi
    .FIELD-SYMBOLS: <DYN_TABLE> LIKE T_ARTMAS "T_ARTMAS is declared as types : begin of....end of .... .
    but it is giviing an error in following form.....
    Just as Sasha wrote, the problem could be you've defined a flat structure and u need a table, but now just a little a question: why do u want to use a dynamic table but your field-symbol is like a certain type?
    That means u know how the table is so u don't need to use a dynamic table, your issue seems not to make sense.
    Max

  • Doc listing all OBIA RPD Projects and related Subject areas and Presentation tables.

    Hi All,
    Can anyone help with the Oracle document ID which gives the RPD Projects and related Subject areas only and Presentation tables.
    I tried using the documentation utlity but it is unable to give me result according to the RPD Projects.
    Thanks,
    Dev

    It is combination of different activities:
    Product guide, check here cool-bi.com
    RPD documentation based on prod guide.
    There might be a project called Project and try to import rpd contents into another then generate rpd doc.
    if helps mark

  • Help with ecomerce and dynamic table link

    I am new to dynamic pages. I am trying to build or use a
    template to display my tables.
    Here is an example of what I want to do.
    http://www.snaz75.com/ if you
    click on any of the links on the left side, it brings up the
    products on the right. I know this is done through tables. I have
    the website built and the tables built, but don't know how to get
    the product to display dynamically without manually adding each
    item.
    I am using yahoo e-commerce and have downloaded their table
    formats. I have all the tables created and uploaded to my hosting.
    I am trying to use these tables to display my product in a simple
    way. Yahoo has a site builder where you can build tables and upload
    them and your product is displayed, but I am extremely limited on
    the actual design of their website builder. I want to use my
    website, but do essentially the same thing. How can I get the built
    tables display my products. I have 1000's of products and I know
    there must be a way display the item through a table using
    template.. I can't imagine someone adding one item at a time to
    their website. Any idea's where to start.

    I have checked with method GET_ATTRIBUTE_VALUEHELP_TYPE of interface IF_WD_CONTEXT_NODE_INFO, on an attribute which i know to have a search help (Foreign key of a check table).
    The method returns 'N', that is the constant IF_WD_VALUE_HELP_HANDLER~CO_VH_TYPE_NO_HELP. So, the framework was not able to find a suitable search help.
    Using method GET_ATTRIBUTE_VALUE_HELP of the same interface, on the same attribute, returns me '111', which is constant C_VALUE_HELP_MODE-AUTOMATIC.
    Therefore, the WD framework knows it has to automatically detect a value help, but fails to find one.
    Also, this means in my opinion that the ALV and the dynamic external mapping are not the culprits: since node creation, no help is detected for any attribute but the date. Honestly, I don't have a clue on what's happening.

  • Relation between RESB and AUFM tables

    can any one tell me how to build the relation between the above two tables
    first i am getting the data from resb
    now i need to get the data from  aufm
    but there are no common key fields
    while selecting the data from aufm i want to put the where conditon on key fields only

    hi
    good
    use this process to know the details.
    Go to SQVI transaction... Create a qucik view.. ztest.. give desc..etc
    Select data source as table join.... enter
    now one screen will come with blank data (blue scrren)
    in that application toolbar second button .. click that.. enter VBAK..
    click that again.. enter VBAP.. now an image will come with links b/w vbak and vbap.. you can use any no. of tables there....
    thanks
    mrutyun^

  • Relation Between RSEG and BSET Tables

    Hi ,
      I want to Calculate the the tax for MIRO document Line item wise, i am not able to get the relation between RSEG and BSET from where i can get the taxes. so, any one can help me to resolve this issue on priority.
    Regards,
    Venugopal.

    Hi, Mr. fantasy,
    I'm not too familar with MIGO - now working in non-logistics environment.
    Did you already try RSEG fields
    LFBNR     LFBNR     CHAR     10     0     Document No. of a Reference Document                                  
    LFGJA     LFGJA     NUMC     4     0     Fiscal Year of Current Period                                  
    LFPOS     LFPOS     NUMC     4     0     Item of a Reference Document     
    just an idea.
    Regards,
    Clemens

  • Discriminator and dynamic table selection

    Is there a way (in DSP 3.0) to use a discriminator to dynamically determine a related table to join in a select or update? On the java client I have a base class with extended class that I would like to model in related tables.
    Thanks,
    Jeff
    Edited by jhoffmanme at 02/08/2008 4:09 AM

    Ok - so you want something like
    <CASE>
    <BASE_CASE>
    <BASE_CASE>
    <LAB_CASE>
    </LAB_CASE>
    <CASE>
    <CASE>
    <BASE_CASE>
    <BASE_CASE>
    <CS_CASE>
    </CS_CASE>
    <CASE>
    So you will need to define a CASE schema element that contains a BASE_CASE, and optionally a LAB_CASE, CS_CASE etc. element.
    your queries will look like :
    function getLABCases()
    for $base_case in BASE_CASES()
    return
    <CASE>
    {$base_case}
    {for $lab_case in LAB_CASES()
                where $lab_case/ID eq $case/ID
                return
                  $lab_case
    </CASE>
    function getCSCases()
    for $base_case in BASE_CASES()
    return
    <CASE>
    {$base_case}
    {for $cs_case in CS_CASES()
                where $cs_case/ID eq $case/ID
                return
                  $cs_case
    </CASE>
    getAllCases()
    ( getLABCases(),
    getCSCases() )
    Use the nested for's as I have shown above rather than...
    for $base_case in BASE_CASES()
    for $lab-case in LAB_CASES()
    where $lab_case/ID eq $base_case/ID
    as the second way forces LAB_CASE table to be read even when it is not required in the output.
    For updates, you will need visit the update template documentation to see how you tell DSP that a CASE with a LAB_CASE came from the LAB_CASES table.

  • Finding column count with dynamic columns and dynamic tables

    I've done some PL/SQL for awhile now but was trying to devise a solution for the following problem:
    I wish to find the number of times a specific value for a column exists in all the tables that contain the field and I have access to see with the current user. The column name and value will be passed in via parameters.
    I was hoping to use something like
    select table_name from all_tab_columns where column_name = <variable table name>;
    then use the results from this to create a select statment based off the tables from the select above. I know the difference between dba_tab_columns and all_tab_columns - I want to make sure that I only retrieve the values i have access to.
    Can anyone point me to some guide / website / reference material I can read to catch up on the idea of creating this statment?
    Thank you.

    Hi,
    it's a test version.
    You can naturally tune it, but it seemed to work:
    declare
    pi_column VARCHAR2(30) := 'DEPTNO';
    pi_value VARCHAR2(4000) := '20';
    v_count NUMBER := 0;
    v_count_tab NUMBER;
    BEGIN
    FOR I IN (select owner, table_name from dba_tab_columns
              where column_name = pi_column
    LOOP
        EXECUTE IMMEDIATE 'SELECT count(*) FROM '||i.owner||'.'||i.table_name||
                          ' WHERE '||pi_column||' = :pi_value'  INTO v_count_tab USING pi_value; 
        v_count := v_count + v_count_tab;
    END LOOP;                   
    dbms_output.put_line(v_count);
    END;Regards

  • Relation between qRFC and SXMB_Moni tables.

    Hello Experts,
    I would like to know if there exists any rerference OR any link between the qRFC tables (TRFCQOUT / TRFCQIN) with the backend master tables of SXMB_MONI (SXMSPMAST, SXMSPERR, SXMSPHIST) ETC.
    This would give me an idea whether I can fetch out the niche details of the records/messages stuck in qRFC from SXMB_MONI.
    Kindly advice.
    Thanks in advance,
    Elizabeth.

    Hi Elizabeth, 
    Check this recent blog..may be useful to you
    SAP XI/PI: Alerts for Queue Errors
    /people/santhosh.kumarv/blog/2009/05/19/sap-xipi-alerts-for-queue-errors
    Regards,
    Sunil.

Maybe you are looking for

  • Unable to send or receive messages to a certain mobile number but can on iPhone

    help! apple I'd is same. works with other numbers!

  • Multi Level Categorization

    Hi All, we have subject profile assigned to a transaction type. this profile has two catalogs Problem and symptom code. the first level is problem which has four entries and subsequent symptom code has 291 dropdown values for first three problem we a

  • Iphoto would not import movies from Iphone 4 - ANYBODY ELSE HAS ISSUES?

    Hello, Yes Iphone 4 is so sexy. I have reception issues too unfortunatly , only where reception is weak anyway, but yes it happens... also iphoto would not import most of the times the iphone 4 videos? any suggestions why and how to fix it ? Many thx

  • Merge Two SQL - need help

    Hi All, Need some tips - like i have two different process runing with just only a SQL query on each. The both the process SQL Query is 90% similar Rather the Second sql has extra two columns and few filterning conditions is different which is Marked

  • Changing the Check Box color when selected/deselected

    How do I do this using the Action tab in Check Box Properties within Acrobat 7.0 (NOT DESIGNER)? I added the check boxes to the .PDF using the check box tool (Box Only-No Text). I am trying to fill the box green when selected and yellow when not sele