JOIN TABLES IN ONE REPORT

Hi,
I'm trying to join some tables in one report. I was successful with it, until I added one table which has many records for one primary key in the main table. I used Order by and Limit to select only the latest row, but then I got this error: Query cannot be parsed, please check the syntax of your query. (ORA-00907: missing right parenthesis)
The sql is here:
select
t.TICKET_ID "Ticket Id",
t.RECEIVED_DATE "Received Date",
t.QUOTE_NUMBER "Quote Number",
r.REQUEST_NAME "Request Type",
s.STATUS_NAME "Status",
p.PRIORITY_NAME "Priority",
t.NUMBER_OF_SUBLINES "Number Of Sublines",
t.QUOTE_VALUE "Quote Value",
c.CURRENCY_NAME "Currency",
t.QUOTE_START_DATE "Quote Start Date",
t.CUSTOMER_NAME "Customer Name",
t.REQUESTER_EMAIL "Requester",
st.STRIPE_NAME "Stripe",
tm.TEAM_NAME "Team",
a.ANALYST_NAME "Quote Analyst",
(select g.GATE_COMM from QTMT_GATE_COMM g where g.TICKET_ID=t.TICKET_ID order by g.GATE_COMM_ID desc limit 1)GATE_COMM,
ac.ANALYST_COMM "Quote Analyst Comment",
cc.CLOSE_COMM "Closing Comment",
se.SERVICE_NAME "Type Of Service",
ro.REOPEN_NAME "Reopen",
t.ASSIGNED_DATE "Assigned Date",
t.LAST_UPDATED "Last Updated",
t.DATE_COMPLETED "Date Completed",
t.EFFORT "Effort"
from
QTMT_TICKETS t,
QTMT_REQUEST_TYPE r,
QTMT_STATUS s,
QTMT_PRIORITY p,
QTMT_CURRENCY c,
QTMT_STRIPE st,
QTMT_TEAM tm,
QTMT_ANALYST a,
QTMT_ANALYST_COMM ac,
QTMT_CLOSE_COMM cc,
QTMT_SERVICE se,
QTMT_REOPEN ro
where
t.REQUEST_TYPE_ID=r.REQUEST_TYPE_ID and
t.STATUS_ID=s.STATUS_ID and
t.PRIORITY_ID=p.PRIORITY_ID and
t.CURRENCY_ID=c.CURRENCY_ID and
t.STRIPE_ID=st.STRIPE_ID and
t.TEAM_ID=tm.TEAM_ID and
t.ANALYST_ID=a.ANALYST_ID and
t.ANALYST_COMM_ID=ac.ANALYST_COMM_ID and
t.CLOSE_COMM_ID=cc.CLOSE_COMM_ID and
t.SERVICE_ID=se.SERVICE_ID and
t.REOPEN_ID=ro.REOPEN_ID
Could you please let me know what do I have wrong?
Thank you and best regards,
Vladimir

It's a problem with me not being able to run the code to test it. Basically the problem is that the subquery is nested too deeply to be able to see the QTMT_TICKETS table. It is not 'missing' as ApexBine suggests but it is unavailable. The most deeply nested subqueries execute first, and that one is executing before the QTMT_TICKETS table is available to it. Off the top of my head, the easiest thing then would be to create a function to get the GATE_COMM value (I'm guessing at the data types):
FUNCTION gate_comm (p_ticket   NUMBER)
RETURN VARCHAR2
AS
  CURSOR c_gc IS
    SELECT g.GATE_COMM
    FROM   QTMT_GATE_COMM g
    WHERE  g.TICKET_ID = p_ticket
    ORDER BY g.GATE_COMM_ID DESC;
BEGIN
  FOR v_Lp IN c_gc LOOP
    RETURN v_Lp.gate_comm;
  END LOOP;
END;Then you can replace the failing subquery in the SQL with gate_comm(t.TICKET_ID)

Similar Messages

  • Mutiple fact tables for one report?

    HI
    I have two fact tables like Shipment and Sales. They each have their own star schema but most of the dimension tables are very similar. In one report I have to combine the two fact tables. so my report would have something like date, product Shiptment and Sales.
    What is the best way to set this up as shipment and sales have their own fact tables but the dimension tables that are being used in this report are common?
    Do i do this in the Physical layer of the rpd and how?

    you need to work in BMM layer for this..
    In one of your business models where there is Sales Fact Table... bring the shipment Fact Table from the physical layer onto this buisness model , and do a complex join to the Time dimension (common dim)...
    Now Bring this Shipment Fact Table from that buisness model to the Presentation Layer under the same Subject Area ( ie now a single Subject Area must have both the Fact Tables under it...
    Bounce back ur servers...
    Now you are good to go...

  • How to use different parameters for two tables(chart and Table) in one report in SSRS?

    Hi,
    Here is my requirement, i have 7 parameters in my report(Site,Account,LOB,year,Month,WeekDay and Date_Filter),
    and in my report i have one table and one Chart,
    my requirement is the table in the report has to show the data for 6 parameters only i.e(Site,Account,LOB,year,Month and WeekDay).so the table has to consider only 6 parameters, and it has ignore the 7th parameter, table should not consider Date_Filter parameter.
    And Chart has to consider all 7 parameters.
    so, when we preview the report table has to show the data for only 6 parameters and chart has to show the data for all 7 parameters.
    if there is a way to get this Please reply me ASAP, it is an urgent requirement.
    Thanks in Advance,
    Naveen

    Hi Naveen,
    Refer below link to create multiple datasets as suggested by Gnanadurai
    http://technet.microsoft.com/en-us/library/ff714047(v=sql.105).aspx
    Thanks
    Swapna

  • Two pivot tables in one report - obiee 11.1.1.5

    Hi experts!
    Is possible to do a two pivot table (EACH with DIFFERENT CALCULATED ITEMS)??
    For example:
    Pivot table:
    Calc1
    Calc2
    Calc3
    (Hide all other members dimension, only show 3 Calc items)
    Pivot table2:
    Calc5
    Calc6
    Calc7
    (Hide all other members dimension, only show 3 Calc items)
    Now...If I change one calc, it changes for all pivot tables in my report... :(
    Thanks!!!
    Edited by: Alex1 on 22-sep-2011 9:44

    Hi!
    I can't create my calcs in column criteria.
    When I create calc items in first pivot table and create a second pivot table, I have this calcs...and I want another calcs in second pivot table...

  • BLOBs from different tables on one report

    Hi,
    I think the declarative BLOB support enhancement in 3.1 is really great. I am running into a problem with a report that joins two tables that both have BLOB columns. I have a Letters table and a Response table. The Response table has a FK linkage to the Letters table with the Letters table being the referenced table. I have a report that joins the Letters & Response tables and provides download links for the BLOBs in both tables. However on the report, only one of the link works at a given point in time. Both the links work fine in isolation (if the other link is commented out in the query).
    I am using the APEX_UTIL.GET_BLOB_FILE_SRC function to download the files. Has anyone tried using this function to download files from two different tables in a single report?
    TIA,
    Ramesh

    Ramesh,
    Is this application on apex.oracle.com by any chance? I just went to test there and am having all sorts of trouble with declarative display of BLOBs in a report but on our dev box, two works fine (except that the link for both is the default rather than what I selected).
    -- Sharon

  • Crystal Reports - Two Tables in one report, grouped by machine.

    I have two tables for machine schedules.  One is a Current Job Table, and the other is a Que Job Table.  I do have tables joined to a definition table for the machine name.
    Cur Job Table - Def table
    Que Job Table - Def table
    I want to report the information from the current job table for each 13 machines in sequence.  Some machines may have more current jobs than qued jobs.
    ...Machine 1 (Machine Name)
    .....Current Jobs (Cur Job Table)
    .....Qued Jobs (Que Job Table)
    ...Machine 2 (Machine Name)
    .....Current Jobs (Cur Job Table)
    .....Qued Jobs (Que Job Table)
    Etc.
    Is there a way to do this easily?  I have tried grouping and sub reports.  Seems like I end up with duplicate records due to the SQL joins.

    Sharon,
    Select distinct will not work here, as select distinct checks all fields in the record, and when joining the two detail tables, it will not clear out "duplicates" on only one side of the join.
    I would also humbly suggest that using Select Distinct to try to "clean up" a query is rather dangerous.  You may end up dropping some data that should appear on the report.  (In fact I recently had to fix a report due to this issue - coded by someone else, of course!  :->)  If you are getting duplicate records and you don't want them, the query should be coded to produce the desired result set WITHOUT the Distinct clause being the reason duplicates are dropped.  (This is not to say that select distinct is not useful, or should never be used.  If you need a distinct list of customers over a date range, using Select Distinct custcode from sales where date between {?start} and {?end} is perfectly OK.)
    HTH,
    Carl

  • Joining Tables Involving "one to many"

    I have a situation where a customer gets a basic "license" to perform a business then he or she may get multiple "permits" to perform sub tasks of the basic business plan.
    I must join the "license" table with the "permits" table. I have currently joined them with a license identification number that appears in both tables, without qualification as to "one to one" or "outer join".
    There is always a license ID number in the licensing table.
    There may be multiple occurrance's of the license ID number in the permits table.
    Should I qualify the join?

    Thank you for the rapid response. I am returning to the Discoverer product after a long absence and need brushing up on many standard concepts.
    In a recent response to a question on joins by another requestor, the forum respondent advised that "you didn't include the join in a condition i.e. master table item x is equal to detail table item x". Isn't it a redundancy to put the join in a condition if a joins already exists for the detail table information. I know that I can trick the CBO into more rapid response by including redundant conditions in the query such as a date range that includes all the records in a table. A test demonstrated that the inclusion of the join in the condition caused the data to literally explode on the screen.

  • How merge query results from joined table into one additional column

    <code>
    Here is example
    TABLE A:
    id | value
    1 | a
    2 | a
    3 | b
    TABLE B
    id | id_in_table_a | value
    1 | 1 | d
    2 | 1 | e
    3 | 2 | g
    </code>
    this select should get all columns from table A where value = 'a' and all values related to this record from B merged to one column separated for example with pipe, so the output should looks like this
    <code>
    id | value | merged_column
    1 | a | d|e
    2 | a | g
    </code>
    thanks for help

    If you are on 10g, you can use this:
    SQL> create table a
      2  as
      3  select 1 id, 'a' value from dual union all
      4  select 2, 'a' from dual union all
      5  select 3, 'b' from dual
      6  /
    Tabel is aangemaakt.
    SQL> create table b
      2  as
      3  select 1 id, 1 id_in_table_a, 'd' value from dual union all
      4  select 2, 1, 'e' from dual union all
      5  select 3, 2, 'g' from dual
      6  /
    Tabel is aangemaakt.
    SQL> select id
      2       , value
      3       , rtrim(v,'|') merged_column
      4    from ( select id
      5                , value
      6                , v
      7                , rn
      8             from a
      9                , b
    10            where a.id = b.id_in_table_a
    11            model
    12                  partition by (a.id)
    13                  dimension by (row_number() over (partition by a.id order by b.id) rn)
    14                  measures (a.value, cast(b.value as varchar2(20)) v)
    15                  rules
    16                  ( v[any] order by rn desc = v[cv()] || '|' || v[cv()+1]
    17                  )
    18         )
    19   where rn = 1
    20  /
       ID VALUE MERGED_COLUMN
        1 a     d|e
        2 a     g
    2 rijen zijn geselecteerd.Regards,
    Rob.

  • How to display 2 internal tablea in one report

    hi
    experts can u help me for this

    suppose you are using 2 tables mara and marc
    move the data into 2 internal tables i_mara and i_marc.
    then move the data into i_out.
    write the data of i_out.
    see this code for data from 4 tables
    REPORT  YSG_MATSTKREPT LINE-SIZE 125.
                             LINE-COUNT 50(5).
    *&                       DATA DECLARATION                              *
    TABLES: MARA,              "GENERAL MASTER DATA
            MARC,              "PLANT DATA FOR MATERIAL
            MARD,              "STORAGE LOCATION DATA FOR MATERIAL
            MAKT.              "MATERIAL DESCRIPTION
    DATA: BEGIN OF I_MARA OCCURS 0,
               MATNR LIKE MARA-MATNR,"MATERIAL NUMBER
          END OF I_MARA.
    DATA: BEGIN OF I_MARC OCCURS 0,
              MATNR LIKE MARC-MATNR,"MATERIAL NUMBER
              WERKS LIKE MARC-WERKS,"PLANT
          END OF I_MARC.
    DATA: BEGIN OF I_MAKT OCCURS 0,
               MATNR LIKE MAKT-MATNR,"MATERIAL NUMBER
               MAKTX LIKE MAKT-MAKTX,"MATERIAL DESCRIPTION
          END OF I_MAKT.
    DATA: BEGIN OF I_MARD OCCURS 0,
               MATNR LIKE MARD-MATNR,"MATERIAL NUMBER
               WERKS LIKE MARD-WERKS,"PLANT
               LGORT LIKE MARD-LGORT,"STORAGE LOCATION
               LABST LIKE MARD-LABST,"VALUATED STOCK WITH UNRESTRICTED USE
          END OF I_MARD.
    DATA: BEGIN OF I_OUT OCCURS 0,
            MATNR LIKE MARC-MATNR,
            WERKS LIKE MARC-WERKS,
            MAKTX LIKE MAKT-MAKTX,
            LGORT LIKE MARD-LGORT,
            LABST LIKE MARD-LABST,
          END OF I_OUT.
    DATA : TOT TYPE I, " TOT - TOTAL STOCK
           PLSTK TYPE I, " PLSTK - PLZNT WISE STOCK
           X TYPE C. "FLAG
    *&                   S E L E C T I O N - S C R E E N                   *
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-100.
    SELECT-OPTIONS: S_MATNR FOR MARA-MATNR .
    SELECTION-SCREEN END OF BLOCK B1.
    **&                  I N I T I A L I Z A T I O N                      *
    *INITIALIZATION.
    S_MATNR-SIGN = 'I'.
    S_MATNR-OPTION = 'EQ'.
    S_MATNR-LOW = 'M-12'.
    S_MATNR-HIGH = 'M-18'.
    *&             S T A R T - O F - S E L E C T I O N                     *
    START-OF-SELECTION.
    SELECT MATNR WERKS FROM MARC
                          INTO TABLE I_MARC
                          WHERE MATNR IN S_MATNR .
    SELECT MATNR WERKS LGORT LABST FROM MARD
                          INTO TABLE  I_MARD
                          FOR ALL ENTRIES IN I_MARC
                          WHERE MATNR = I_MARC-MATNR
                          AND WERKS = I_MARC-WERKS.
    SELECT MATNR MAKTX FROM MAKT INTO TABLE I_MAKT
                          FOR ALL ENTRIES IN I_MARC
                          WHERE MATNR = I_MARC-MATNR.
      LOOP AT I_MARC.
        MOVE I_MARC-MATNR TO I_OUT-MATNR.
        MOVE I_MARC-WERKS TO I_OUT-WERKS.
        READ TABLE I_MAKT WITH KEY MATNR = I_MARD-MATNR.
        MOVE I_MAKT-MAKTX TO I_OUT-MAKTX.
      LOOP AT I_MARD WHERE MATNR = I_MARC-MATNR
                         AND WERKS = I_MARC-WERKS.
          MOVE I_MARD-LGORT TO I_OUT-LGORT.
          MOVE I_MARD-LABST TO I_OUT-LABST.
          APPEND I_OUT.
        ENDLOOP.
        CLEAR I_OUT.
      ENDLOOP.
    *&                  T O P - O F - P A G E                              *
    TOP-OF-PAGE.
      WRITE:/ 'DATE:' ,SY-DATUM.
      FORMAT COLOR 4 INTENSIFIED OFF.
      WRITE:/2 'PLANT',
             9 'STG.LOC',
            20 'MATERIAL.NO.',
            55 'DESCRIPTION',
            88 'STOCK'.
    *&                  E N D - O F - P A G E                              *
    END-OF-PAGE.
      WRITE: / SY-ULINE,
             /100 'PAGNO: ',SY-PAGNO,
             SY-ULINE.
    *&        E N D -- O F --  S E L E C T I O N                           *
    END-OF-SELECTION.
    SORT I_OUT ASCENDING BY WERKS LGORT.
      LOOP AT I_OUT.
        WRITE:/    SY-ULINE,SY-VLINE,
                   I_OUT-WERKS,SY-VLINE,
                   I_OUT-LGORT,SY-VLINE,
                   I_OUT-MATNR,SY-VLINE,
                   I_OUT-MAKTX,SY-VLINE.
                   AT END OF LABST.
                   WRITE: I_OUT-LABST,SY-VLINE.
                   ENDAT.
        TOT = TOT + I_OUT-LABST.
        AT END OF LABST.
        WRITE : TOT, SY-VLINE.
        ENDAT.
    *AT END OF WERKS.
    *NEW-PAGE.
    *ENDAT.
        AT LAST.
        FORMAT COLOR 7 INTENSIFIED OFF.
        WRITE : /87 'TOTAL STOCK = ',TOT.
        ENDAT.
      ENDLOOP.
    regards,
    srinivas

  • Combining two tables into one result

    Hi all, I am fairly inexperienced with Crystal but have gained good results from the reports I have created, I am fluent in SQL and Basic to an extent.  I am interigating a Pronto database and I want concatenate two tables into one report.
    Table One: Customer Orders
    Fields:  Customer No, Invoice Number, Invoice date, Invoice Amount, Cost Amount.
    Table Two: Archived Customer Orders
    Fields:  Customer No, Invoice Number, Invoice date, Invoice Amount, Cost Amount.
    I want to complete a report that will tell me the sales for a given period and the outstanding orders for each customer total for all fields in each table combined into one figure.
    Any help would be greatly appreciated.
    Thanks in advance

    Hi Grant,
    As you said you are goot at writing SQL, in Crystal write a SQL statement in Add Command to join both table using Union / Union all
    If you use Union then it will filter duplicate records and pull the data from database, If you use Union All then it will include all your duplicate records.  Please use Union / Union All as required.
    Once you get all data into the report create a parameter for date range and generate the summaries as required.
    Thanks,
    Sastry

  • Unable to join two fact tables via one common dimension in RPD(Repository)

    I have created two fact tables F1 & F2 and one dimension D.
    F1 is joined to D and F2 is also joined to D in Physical layer as well as in BMM layer.
    I created one report in OBI Answers using these three tables.It Showed me the following error.
    **Error Details**
    **Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P**
    **State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 15018] Incorrectly defined logical table source (for fact table dfghdfh) does not contain mapping for [Dashboard_Fact.Period_Sgt_Key]. (HY000)**
    **SQL Issued: SELECT dfghdfh.Period_Sgt_Key saw_0, "Period Dim".Period_Sgt_Key saw_1, Dashboard_Fact.Period_Sgt_Key saw_2 FROM service_delivery ORDER BY saw_0, saw_1, saw_2**
    How to cope up with the issue or can anyone tell me the alternate workaround for this?

    That is what i have tried.
    I have made a logical table TEST and dragged two fact tables f1 & f2 in source.
    Now when i drag different columns from different fact tables(that are in TEST logical table) in report, it gives an error and not making any joins that you are mentioning.
    ERROR MESSAGE:--
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 15018] Incorrectly defined logical table source (for fact table Test) does not contain mapping for [Test.SurveyName_Id, Test.SurveyHead_Id, Test.Respondent_Id, Test.SDBusiness_Area_Id, Test.Period_Sgt_Key, Test.OBS_Id, Test.VOCBusiness_Area_Id, Test.Question_Sgt_Key]. (HY000)
    The columns mentioned in the error message are all from test logical table..some are from F1 & some from F2.

  • WBS report and joining tables

    Hello!
    I have the following problem - I want to make one report in the report painter or report writer but the problem is that I can not join two tables to the report - CCSS  and RPPS for Project Reporting. Is it possible at all to make such a merger? My idea is to prepare report for following:
    WBS group (for example set) /budget / commitment items/ actuals /.
    Thank you in advance and will be happy for someone to help me and/or guide me
    Elena

    Hi Eli,
    Unfortunately, we do not use standard hierarchies, and this can not cover our needs. In addition - as to me is the shame to admit it - I'm not gone deeply with the idea for these hierarchies. In the end - so far I have not idea how to made the proper customizing for  this and ...
    So when I tryed to create my library - I used RPPS table but as a characteristics  there is no field "version"
    Elena

  • Left Outer Joining multiple tables to one source table FAILS with VLD-1511

    Hi all,
    Is it me, or is OWB unable to handle left outer joining 1 source table to multiple other tables?
    I want to load a fact table so I have 1 source table with measures. This table must be outer joined to some dimensions that have their FK in the fact table.
    The SQL statement would look like this (and is perfectly valid):
    select ...
    from input, dim1, dim2
    where input.c1 = dim1.c1(+)
    and input.c2 = dim2.c2(+);
    I put the where clause in the joiner operator and validate, but that gives me message VLD-1511: A table may be outer joined to at most one other table.
    Even splitting this up into one outer join per joiner still gives this message.
    A search and look around on the forum and on metalink shows there are related issues (like bug 3334035). Seemingly creating a view is the work-around to use.....? (ie downgrading owb to a simple gui tool) }-;
    Have other people experienced this problem of not being able to outer join one input table to multiple other tables?
    Thanks,
    Ed

    I have had some feedback from Oracle. It turns out this has to do with 2 issues. Below I have pasted the text that Support gave me:
    <---------- START QUOTE ---------->
    RESEARCH
    =========
    Bug 3437036 KEY LOOKUP DOES NOT DETECT ORA-1417 IN VALIDATE/GENERATE STEP
    Unpublished Bug 4211684 FORWARD PORT OF BUG 3437036
    shows:
    Some more development has been completed when this bug is fixed in Paris.
    The following are the details:
    1. If the join condition contains a full outer join such as
    tab1.c (+) = tab2.c (+) and tab2.c (+) = tab3.c
    then the new validations implemented for this bug do not apply since
    in OWB, full outer join triggers generation of joins in ANSI syntax.
    ANSI syntax does not have the original problem the base bug of this
    bug reported.
    2. If the join condition does not contain any full outer join condition,
    then the join is generated in Oracle join syntax, which is subject two
    several restrictions. The fix to this bug check two of the restrictions.
    3. The first restriction in Oracle syntax is that the outer join operator
    "(+)" can only directly be attached to a column name. If you attach it
    to an expression, such as the following:
    (tab1.c + 1) (+) = tab2.c
    Then there will be an ORA-936 error at the time of mapping deployment.
    For this case, I have added a validation message VLD-1512 to error out
    this situation.
    4. The second restriction in Oracle syntax is that a table can only be
    outer joined to exactly one other table.
    For example, this is an invalid join in Oracle syntax:
    tab1.c (+) = tab2.c and tab1.d (+) = tab3.d
    because tab1 is left outer joined to tab2 and tab3.
    But note that the following is still valid in Oracle syntax:
    tab1.c (+) = tab2.c and tab1.d = tab3.d (+)
    because tab1 is left outer joined to tab2 and right outer joined to tab3.
    So this latter case does not violate the restriction that "same oj" to
    more than 1 table is not allowed.
    If same oj to more than 1 table is specified in a join condition,
    VLD-1511 will be issued, and the map is made invalid.
    <---------- END QUOTE ---------->
    OWB does a partial validation, ie not all access paths are (can be) checked. A full check is only done by the database itself. So some scenarios (like checking whether multiple tables are outer joined the correct way) are not checked, and in this case are flagged with an error (even though it is actually a correct scenario).
    Seemingly this was not flagged with an error in earlier versions of OWB, so beware, OWB behaviour may change when upgrading...
    Alternative solutions are (1) using key lookups, (2) using a view with all outer joins in there, (3) using intermediate result tables between the joins.
    Hope this info helps some people prevent spending too much time on a false error message,
    Ed

  • Layout issue - More than one table sections on report?

    Hello all
    I am wondering if any of you know if there is a way to have more than one table or table field on a report.
    I'm asking this because I'd like to include a large number of fields in one report, but then that makes the report hard to read (everything is on one long line).
    I am wondering if there is a way to have more than one table section on a report so I could have the address information at the top of the report than have other additional information below the address. Basically I'm interested in making things easier to read for the user.

    Use Pivot tables to isolate the columns you want in each table in your report.
    Mike L

  • Am inserting only one table in a join table view

    am in Jdeveloper 11.1.2.1.0
    hi i have the following view am only able to insert in one table,which is SMS_PARTY_ADDRESS,am not able to insert to the othe join table which is property, my view is
    <?xml version="1.0" encoding="windows-1252" ?>
    <!DOCTYPE ViewObject SYSTEM "jbo_03_01.dtd">
    <!---->
    <ViewObject
      xmlns="http://xmlns.oracle.com/bc4j"
      Name="smsProp_partyAddress"
      Version="11.1.2.60.81"
      BindingStyle="OracleName"
      CustomQuery="true"
      PageIterMode="Full"
      UseGlueCode="false">
      <DesignTime>
        <Attr Name="_isExpertMode" Value="true"/>
      </DesignTime>
      <Properties>
        <SchemaBasedProperties>
          <LABEL
            ResId="sms1100.smsProp_partyAddress_LABEL"/>
        </SchemaBasedProperties>
      </Properties>
      <ViewAccessor
        Name="Sub_lov1"
        ViewObjectName="sms1100.Sub_lov"
        RowLevelBinds="true"/>
      <ListBinding
        Name="LOV_Town"
        ListVOName="Sub_lov1"
        ListRangeSize="-1"
        ComboRowCountHint="10"
        NullValueFlag="none"
        MRUCount="0">
        <AttrArray Name="AttrNames">
          <Item Value="Town"/>
        </AttrArray>
        <AttrArray Name="DerivedAttrNames">
          <Item Value="Suburb"/>
          <Item Value="PostalCode"/>
          <Item Value="TowId"/>
        </AttrArray>
        <AttrArray Name="ListAttrNames">
          <Item Value="Town"/>
          <Item Value="Suburb"/>
          <Item Value="PostalCode"/>
          <Item Value="Id"/>
        </AttrArray>
        <AttrArray Name="ListDisplayAttrNames">
          <Item Value="Town"/>
          <Item Value="Suburb"/>
          <Item Value="PostalCode"/>
          <Item Value="DsdRegion"/>
          <Item Value="ServiceDeliveryArea"/>
        </AttrArray>
        <DisplayCriteria/>
      </ListBinding>
      <SQLQuery><![CDATA[SELECT SmsPartyAddress.ADDRESS_LINE1,
           SmsPartyAddress.ID,
           SmsPartyAddress.ADDRESS_LINE2,
           SmsPartyAddress.ADDRESS_LINE3,
           SmsPartyAddress.ADDRESS_LINE4,
           SmsPartyAddress.ADDRESS_TYPE_IND,
           SmsPartyAddress.PAR_ID,
           SmsPartyAddress.PROP_ID,
           SmsPartyAddress.START_DT,
           SmsProperties.TOW_ID,
           SmsProperties.ID AS ID1,
           SmsProperties.ADDRESS_LINE,
           SmsProperties.ERF_NO,
           SmsProperties.WAR_ID,
           SmsProperties.ZONE,
            DECODE(TOW1.TOWN,NULL,TOW.TOWN,TOW1.TOWN)TOWN ,
           TOW.TOWN SUBURB,
           POSTAL_CODE
    FROM SMS_PARTY_ADDRESS SmsPartyAddress, SMS_PROPERTIES SmsProperties,
    SMS_TOWNS TOW
        ,SMS_TOWNS TOW1
        ,SMS_POSTAL_CODES PCOD
    WHERE SmsPartyAddress.PROP_ID = SmsProperties.ID(+)
    and TOW.PCOD_ID = PCOD.ID
        AND TOW.TOW_ID = TOW1.ID (+)
        --and TOW1.ID = SMSPROPERTIES.TOW_ID(+)
        and TOW.ID = SMSPROPERTIES.TOW_ID
        and SmsPartyAddress.prop_id = SmsProperties.id
         CONNECT BY PRIOR TOW.TOW_ID = TOW.ID]]></SQLQuery>
      <EntityUsage
        Name="SmsPartyAddress"
        Entity="sms1100.SmsPartyAddress"/>
      <EntityUsage
        Name="SmsProperties"
        Entity="sms1100.SmsProperties"
        Association="sms1100.proppaddAssociation"
        AssociationEnd="sms1100.proppaddAssociation.SmsProperties"
        SourceUsage="sms1100.smsProp_partyAddress.SmsPartyAddress"
        ReadOnly="true"
        Reference="true"
        DeleteParticipant="false"
        JoinType="LEFT OUTER JOIN">
        <DesignTime>
          <AttrArray Name="_srcAttributes">
            <Item Value="sms1100.SmsPartyAddress.PropId"/>
          </AttrArray>
          <AttrArray Name="_dstAttributes">
            <Item Value="sms1100.SmsProperties.Id"/>
          </AttrArray>
        </DesignTime>
      </EntityUsage>
      <ViewAttribute
        Name="AddressLine1"
        PrecisionRule="true"
        EntityAttrName="AddressLine1"
        EntityUsage="SmsPartyAddress"
        AliasName="ADDRESS_LINE1"/>
      <ViewAttribute
        Name="Id"
        IsUpdateable="while_insert"
        PrecisionRule="true"
        EntityAttrName="Id"
        EntityUsage="SmsPartyAddress"
        AliasName="ID"/>
      <ViewAttribute
        Name="AddressLine2"
        PrecisionRule="true"
        EntityAttrName="AddressLine2"
        EntityUsage="SmsPartyAddress"
        AliasName="ADDRESS_LINE2"/>
      <ViewAttribute
        Name="AddressLine3"
        PrecisionRule="true"
        EntityAttrName="AddressLine3"
        EntityUsage="SmsPartyAddress"
        AliasName="ADDRESS_LINE3"/>
      <ViewAttribute
        Name="AddressLine4"
        PrecisionRule="true"
        EntityAttrName="AddressLine4"
        EntityUsage="SmsPartyAddress"
        AliasName="ADDRESS_LINE4"/>
      <ViewAttribute
        Name="AddressTypeInd"
        IsNotNull="true"
        PrecisionRule="true"
        EntityAttrName="AddressTypeInd"
        EntityUsage="SmsPartyAddress"
        AliasName="ADDRESS_TYPE_IND"/>
      <ViewAttribute
        Name="ParId"
        PrecisionRule="true"
        EntityAttrName="ParId"
        EntityUsage="SmsPartyAddress"
        AliasName="PAR_ID"/>
      <ViewAttribute
        Name="PropId"
        PrecisionRule="true"
        EntityAttrName="PropId"
        EntityUsage="SmsPartyAddress"
        AliasName="PROP_ID"/>
      <ViewAttribute
        Name="StartDt"
        IsNotNull="true"
        PrecisionRule="true"
        EntityAttrName="StartDt"
        EntityUsage="SmsPartyAddress"
        AliasName="START_DT"/>
      <ViewAttribute
        Name="TowId"
        PrecisionRule="true"
        EntityAttrName="TowId"
        IsUpdateable="true"
        EntityUsage="SmsProperties"
        AliasName="TOW_ID"
        IsPersistent="true"/>
      <ViewAttribute
        Name="Id1"
        IsUpdateable="while_insert"
        PrecisionRule="true"
        EntityAttrName="Id"
        EntityUsage="SmsProperties"
        AliasName="ID1"/>
      <ViewAttribute
        Name="AddressLine"
        IsNotNull="true"
        PrecisionRule="true"
        EntityAttrName="AddressLine"
        EntityUsage="SmsProperties"
        AliasName="ADDRESS_LINE"/>
      <ViewAttribute
        Name="ErfNo"
        IsUnique="true"
        IsNotNull="true"
        PrecisionRule="true"
        EntityAttrName="ErfNo"
        EntityUsage="SmsProperties"
        AliasName="ERF_NO"/>
      <ViewAttribute
        Name="WarId"
        PrecisionRule="true"
        EntityAttrName="WarId"
        EntityUsage="SmsProperties"
        AliasName="WAR_ID"/>
      <ViewAttribute
        Name="Zone"
        IsNotNull="true"
        PrecisionRule="true"
        EntityAttrName="Zone"
        EntityUsage="SmsProperties"
        AliasName="ZONE"/>
      <ViewAttribute
        Name="Town"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="60"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="TOWN"
        Expression="TOWN"
        SQLType="VARCHAR"
        LOVName="LOV_Town">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="60"/>
        </DesignTime>
        <Properties>
          <SchemaBasedProperties>
            <CONTROLTYPE
              Value="combo_lov"/>
          </SchemaBasedProperties>
        </Properties>
      </ViewAttribute>
      <ViewAttribute
        Name="Suburb"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="60"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="SUBURB"
        Expression="SUBURB"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="60"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="PostalCode"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="4"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="POSTAL_CODE"
        Expression="POSTAL_CODE"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="4"/>
        </DesignTime>
      </ViewAttribute>
      <AttrArray Name="KeyAttributes">
        <Item Value="Id"/>
      </AttrArray>
      <ResourceBundle>
        <PropertiesBundle
          PropertiesFile="SmsFrontService.SmsFrontServiceBundle"/>
      </ResourceBundle>
    </ViewObject>i what to insert in both table partyAddress and propertyaddress,the property table the Updateable="never" and is disable,am not able to set is to always

    use this method but the column i still disable
    <EntityUsage
    Name="SmsProperties"
    Entity="sms1100.SmsProperties"
    Association="sms1100.proppaddAssociation"
    AssociationEnd="sms1100.proppaddAssociation.SmsProperties"
    SourceUsage="sms1100.smsProp_partyAddress.SmsPartyAddress"
    Reference="true"
    ReadOnly="false"
    DeleteParticipant="false"
    JoinType="LEFT OUTER JOIN">
    public class smsProp_partyAddressImpl extends ViewObjectImpl {
        protected void create(AttributeList attributeList) {
        // The view row will already have created "blank" entity instances
          SmsPropertiesImpl newProperty = new SmsPropertiesImpl();
        SmsPartyAddressImpl newPostal = new SmsPartyAddressImpl();
        //SmsPropertiesViewImpl newProperty = getSmsPropertiesView2();
        //SmsPartyAddressViewImpl  newPostal = getSmsPartyAddressView1();
        //SmsPropertiesImpl newProperty = getSmsPropertiesView2();
        //SmsPartyAddressImpl  newPostal = getSmsPartyAddressView1();
        try {
        // Let postal Address "blank" entity instance to do programmatic defaulting
        newProperty.create(attributeList);
        // Let postalAddress "blank" entity instance to do programmatic
        // defaulting passing in new SmsPropertiesImpl instance so its attributes
        // are available to the SmsPartyAddressImpl's create method.
        newPostal.create(newProperty);
        catch (JboException ex) {
        newProperty.revert();
        newPostal.revert();
        throw ex;
        catch (Exception otherEx) {
        newProperty.revert();
        newPostal.revert();
        throw new RowCreateException(true /* EO Row? */,
        "SmsProperties" /* EO Name */,
        otherEx /* Details */);
    }but the updatable="Always"
    the view is
    <?xml version="1.0" encoding="windows-1252" ?>
    <!DOCTYPE ViewObject SYSTEM "jbo_03_01.dtd">
    <!---->
    <ViewObject
      xmlns="http://xmlns.oracle.com/bc4j"
      Name="smsProp_partyAddress"
      Version="11.1.2.60.81"
      BindingStyle="OracleName"
      CustomQuery="true"
      PageIterMode="Full"
      UseGlueCode="false"
      RowClass="sms1100.smsProp_partyAddressRowImpl"
      ComponentClass="sms1100.smsProp_partyAddressImpl"
      RowInterface="sms1100.common.smsProp_partyAddressRow"
      ClientRowProxyName="sms1100.client.smsProp_partyAddressRowClient">
      <DesignTime>
        <Attr Name="_isExpertMode" Value="true"/>
        <Attr Name="_codeGenFlag2" Value="Access|Coll|Prog|VarAccess"/>
        <Attr Name="_isCodegen" Value="true"/>
      </DesignTime>
      <Properties>
        <SchemaBasedProperties>
          <LABEL
            ResId="sms1100.smsProp_partyAddress_LABEL"/>
        </SchemaBasedProperties>
      </Properties>
      <ViewAccessor
        Name="Sub_lov1"
        ViewObjectName="sms1100.Sub_lov"
        RowLevelBinds="true"/>
      <ListBinding
        Name="LOV_Town"
        ListVOName="Sub_lov1"
        ListRangeSize="-1"
        ComboRowCountHint="10"
        NullValueFlag="none"
        MRUCount="0">
        <AttrArray Name="AttrNames">
          <Item Value="Town"/>
        </AttrArray>
        <AttrArray Name="DerivedAttrNames">
          <Item Value="Suburb"/>
          <Item Value="PostalCode"/>
          <Item Value="TowId"/>
        </AttrArray>
        <AttrArray Name="ListAttrNames">
          <Item Value="Town"/>
          <Item Value="Suburb"/>
          <Item Value="PostalCode"/>
          <Item Value="Id"/>
        </AttrArray>
        <AttrArray Name="ListDisplayAttrNames">
          <Item Value="Town"/>
          <Item Value="Suburb"/>
          <Item Value="PostalCode"/>
          <Item Value="DsdRegion"/>
          <Item Value="ServiceDeliveryArea"/>
        </AttrArray>
        <DisplayCriteria/>
      </ListBinding>
      <SQLQuery><![CDATA[SELECT SmsPartyAddress.ADDRESS_LINE1,
           SmsPartyAddress.ID,
           SmsPartyAddress.ADDRESS_LINE2,
           SmsPartyAddress.ADDRESS_LINE3,
           SmsPartyAddress.ADDRESS_LINE4,
           SmsPartyAddress.ADDRESS_TYPE_IND,
           SmsPartyAddress.PAR_ID,
           SmsPartyAddress.PROP_ID,
           SmsPartyAddress.START_DT,
           SmsProperties.TOW_ID,
           SmsProperties.ID AS ID1,
           SmsProperties.ADDRESS_LINE,
           SmsProperties.ERF_NO,
           SmsProperties.WAR_ID,
           SmsProperties.ZONE,
            DECODE(TOW1.TOWN,NULL,TOW.TOWN,TOW1.TOWN)TOWN ,
           TOW.TOWN SUBURB,
           POSTAL_CODE
    FROM SMS_PARTY_ADDRESS SmsPartyAddress, SMS_PROPERTIES SmsProperties,
    SMS_TOWNS TOW
        ,SMS_TOWNS TOW1
        ,SMS_POSTAL_CODES PCOD
    WHERE SmsPartyAddress.PROP_ID = SmsProperties.ID(+)
    and TOW.PCOD_ID = PCOD.ID
        AND TOW.TOW_ID = TOW1.ID (+)
        --and TOW1.ID = SMSPROPERTIES.TOW_ID(+)
        and TOW.ID = SMSPROPERTIES.TOW_ID
        and SmsPartyAddress.prop_id = SmsProperties.id
         CONNECT BY PRIOR TOW.TOW_ID = TOW.ID]]></SQLQuery>
      <EntityUsage
        Name="SmsPartyAddress"
        Entity="sms1100.SmsPartyAddress"/>
      <EntityUsage
        Name="SmsProperties"
        Entity="sms1100.SmsProperties"
        Association="sms1100.proppaddAssociation"
        AssociationEnd="sms1100.proppaddAssociation.SmsProperties"
        SourceUsage="sms1100.smsProp_partyAddress.SmsPartyAddress"
        Reference="true"
        ReadOnly="false"
        DeleteParticipant="false"
        JoinType="LEFT OUTER JOIN">
        <DesignTime>
          <AttrArray Name="_srcAttributes">
            <Item Value="sms1100.SmsPartyAddress.PropId"/>
          </AttrArray>
          <AttrArray Name="_dstAttributes">
            <Item Value="sms1100.SmsProperties.Id"/>
          </AttrArray>
        </DesignTime>
      </EntityUsage>
      <ViewAttribute
        Name="AddressLine1"
        PrecisionRule="true"
        EntityAttrName="AddressLine1"
        EntityUsage="SmsPartyAddress"
        AliasName="ADDRESS_LINE1"/>
      <ViewAttribute
        Name="Id"
        IsUpdateable="while_insert"
        PrecisionRule="true"
        EntityAttrName="Id"
        EntityUsage="SmsPartyAddress"
        AliasName="ID"/>
      <ViewAttribute
        Name="AddressLine2"
        PrecisionRule="true"
        EntityAttrName="AddressLine2"
        EntityUsage="SmsPartyAddress"
        AliasName="ADDRESS_LINE2"/>
      <ViewAttribute
        Name="AddressLine3"
        PrecisionRule="true"
        EntityAttrName="AddressLine3"
        EntityUsage="SmsPartyAddress"
        AliasName="ADDRESS_LINE3"/>
      <ViewAttribute
        Name="AddressLine4"
        PrecisionRule="true"
        EntityAttrName="AddressLine4"
        EntityUsage="SmsPartyAddress"
        AliasName="ADDRESS_LINE4"/>
      <ViewAttribute
        Name="AddressTypeInd"
        IsNotNull="true"
        PrecisionRule="true"
        EntityAttrName="AddressTypeInd"
        EntityUsage="SmsPartyAddress"
        AliasName="ADDRESS_TYPE_IND"/>
      <ViewAttribute
        Name="ParId"
        PrecisionRule="true"
        EntityAttrName="ParId"
        EntityUsage="SmsPartyAddress"
        AliasName="PAR_ID"/>
      <ViewAttribute
        Name="PropId"
        PrecisionRule="true"
        EntityAttrName="PropId"
        EntityUsage="SmsPartyAddress"
        AliasName="PROP_ID"/>
      <ViewAttribute
        Name="StartDt"
        IsNotNull="true"
        PrecisionRule="true"
        EntityAttrName="StartDt"
        EntityUsage="SmsPartyAddress"
        AliasName="START_DT"/>
      <ViewAttribute
        Name="TowId"
        PrecisionRule="true"
        EntityAttrName="TowId"
        EntityUsage="SmsProperties"
        AliasName="TOW_ID"/>
      <ViewAttribute
        Name="Id1"
        IsUpdateable="while_insert"
        PrecisionRule="true"
        EntityAttrName="Id"
        EntityUsage="SmsProperties"
        AliasName="ID1"/>
      <ViewAttribute
        Name="AddressLine"
        IsNotNull="true"
        PrecisionRule="true"
        EntityAttrName="AddressLine"
        EntityUsage="SmsProperties"
        AliasName="ADDRESS_LINE"/>
      <ViewAttribute
        Name="ErfNo"
        IsUnique="true"
        IsNotNull="true"
        PrecisionRule="true"
        EntityAttrName="ErfNo"
        EntityUsage="SmsProperties"
        AliasName="ERF_NO"/>
      <ViewAttribute
        Name="WarId"
        PrecisionRule="true"
        EntityAttrName="WarId"
        EntityUsage="SmsProperties"
        AliasName="WAR_ID"/>
      <ViewAttribute
        Name="Zone"
        IsNotNull="true"
        PrecisionRule="true"
        EntityAttrName="Zone"
        EntityUsage="SmsProperties"
        AliasName="ZONE"/>
      <ViewAttribute
        Name="Town"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="60"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="TOWN"
        Expression="TOWN"
        SQLType="VARCHAR"
        LOVName="LOV_Town">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="60"/>
        </DesignTime>
        <Properties>
          <SchemaBasedProperties>
            <CONTROLTYPE
              Value="combo_lov"/>
          </SchemaBasedProperties>
        </Properties>
      </ViewAttribute>
      <ViewAttribute
        Name="Suburb"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="60"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="SUBURB"
        Expression="SUBURB"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="60"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="PostalCode"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="4"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="POSTAL_CODE"
        Expression="POSTAL_CODE"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="4"/>
        </DesignTime>
      </ViewAttribute>
      <AttrArray Name="KeyAttributes">
        <Item Value="Id"/>
      </AttrArray>
      <ResourceBundle>
        <PropertiesBundle
          PropertiesFile="SmsFrontService.SmsFrontServiceBundle"/>
      </ResourceBundle>
    </ViewObject>am also geting this error in my view after i set readOnly="false"
    Remove updateable flag from entity usage or mark attributes as key attributes for this entity usage
    i follow your link

Maybe you are looking for

  • Trying to understand the difference in dvd types

    I just purchased a samsung dvd recorder so I can record from my TV. I tried recording something on DVD -R which is what my ibook reads. The dvd recorder can play what I recorded but the ibook doesn't even acknowledge the dvd when I put it in the slot

  • Sound Problem in Compaq Presario CQ40-108TU

    I've Transcend 2GB DDR2 667 memory and put it in my laptop (Compaq Presario CQ40-108tu). It read the whole 4GB memory coz I'm using Windows Vista Ultimate 64-bit but it doesn't have an audio. I've try to troubleshoot it, first try it with only 2GB me

  • What accounts for *intermittent* Error -8 failures?

    I've been following this group carefully, and configured my router and MacBookPro so that video iChat works successfully on my home wireless network. SOMETIMES. This is too weird, and I'm on the verge of giving up. First, I get it working fine. Then

  • Web hosting: catalyst vs Office 365

    Hello, I am creating my website in Muse for my small business and currently use Adobe CC as well as MS Office 365 for business email/server. I am getting ready to publish my website and wonder if anyone can provide insight about the hosting capabilit

  • Output device type

    Hi All, To get the print of a PO one device type is getting selected, but we came to know that we need to select another device type so that we can take the printout of the PO with out any problem. But i am not sure where to change the device type in