Update Behavior using Multiple tables

I'm trying to use the Update behavior from Dreamweaver MX2004
to update fields from diferent joined tables. The search form works
OK as I joined the tables and I get great results (see SQL Query
below). When I try to create link to a detail page from the master
page and I use the same recordset as below and I use the update
behavior, I can only choose a table at the time to update fields
using only one key. If I choose only one table and pass one key
field is OK but I need to update all three joined tables. Is there
a way to do something like this in the Link field in the master
page calling the detail page? Is there is a correct way to pass the
three keys from the master page to the detail page? I'm using ASP
and standard SQL. The environment is Windows for testing and SQL
server.
Detail Page Parameters (not sure if this could be done):
details_Admin_Skill_Resource.asp?resourceSkillMapID=
<%=(Recordset1.Fields.Item("resourceSkillMapID").Value)%>?<%=(Recordset1.Fields.Item("skil lID").Value)%>?<%=(Recordset1.Fields.Item("resourceId").Value)%>
I'm also inserting hidden fileds in the detail form. Any
Ideas how to update several tables in DW MX2004 with the update
behavior?
This is the query in the recordset and it is working OK as it
produces results from the search page. What modifications I need to
do to this recordset in the update page?
Thank you for your help!!!
Carlos Melendez
[email protected]
This is what I typed in the advanced SQL box in the
recordset.
SELECT
ResourceSkillMapping.resourceSkillMapID,ResourceSkillMapping.skillID,ResourceSkillMapping .competenceLevel,skill.skillname,resource.resourceName,resource.resourceLoginId,resource.r esourceId,resource.profileId,resource.resourceGroupID,resource.resourceType,resource.activ e,resource.autoAvail,resource.extension,resource.orderInRG,resource.dateInactive,resource. assignedTeamID,resource.resourceFirstName,resource.resourceLastName
FROM ResourceSkillMapping INNER JOIN Skill ON
ResourceSkillMapping.skillID = Skill.skillID INNER JOIN Resource ON
ResourceSkillMapping.resourceSkillMapID =
Resource.resourceSkillMapID
WHERE (Resource.resourceLoginID LIKE '%Agent_asp%') AND
(Resource.active = 1)
Variables
Skill_asp for skillName
Agent_asp for resourceLoginID
Default value of variables is 1 to display all records
Runtime
Request.QueryString("skillname")
Request.QueryString("resourceLoginID")

ITCoreTeam wrote:
> I'm trying to use the Update behavior from Dreamweaver
MX2004 to
update fields
> from diferent joined tables. The search form works OK
as I joined the
tables
> and I get great results (see SQL Query below). When I
try to create
link to a
> detail page from the master page and I use the same
recordset as
below and I
> use the update behavior, I can only choose a table at
the time to
update fields
> using only one key. If I choose only one table and pass
one key field
is OK but
> I need to update all three joined tables. Is there a
way to do
something like
> this in the Link field in the master page calling the
detail page? Is
there is
> a correct way to pass the three keys from the master
page to the
detail page?
> I'm using ASP and standard SQL. The environment is
Windows for
testing and SQL
> server.
> Detail Page Parameters:
> details_Admin_Skill_Resource.asp?resourceSkillMapID=
>
>
<%=(Recordset1.Fields.Item("resourceSkillMapID").Value)%>?<%=(Recordset1.Fields.
>
Item("skillID").Value)%>?<%=(Recordset1.Fields.Item("resourceId").Value)%>
>
> I'm also inserting hidden fileds in the detail form.
Any Ideas how
to update
> several tables in DW MX2004 with the update behavior?
>
>
> This is the query in the recordset and it is working OK
as it
produces results
> from the search page. What modifications I need to do
to this
recordset in the
> update page?
>
>
> Thank you for your help!!!
> Carlos Melendez
> [email protected]
>
> This is what I typed in the advanced SQL box in the
recordset.
> SELECT
>
>
>
ResourceSkillMapping.resourceSkillMapID,ResourceSkillMapping.skillID,ResourceSki
>
llMapping.competenceLevel,skill.skillname,resource.resourceName,resource.reso
>
>
>
urceLoginId,resource.resourceId,resource.profileId,resource.resourceGroupID,reso
>
urce.resourceType,resource.active,resource.autoAvail,resource.extension,resou
>
>
>
rce.orderInRG,resource.dateInactive,resource.assignedTeamID,resource.resourceFir
> stName,resource.resourceLastName
> FROM ResourceSkillMapping INNER JOIN Skill ON
ResourceSkillMapping.skillID =
> Skill.skillID INNER JOIN Resource ON
ResourceSkillMapping.resourceSkillMapID =
>
> Resource.resourceSkillMapID
> WHERE (Resource.resourceLoginID LIKE '%Agent_asp%') AND
(Resource.active = 1)
> OR (Skill.skillName LIKE '%Skill_asp%')
>
> Variables
> Skill_asp for skillName
> Agent_asp for resourceLoginID
>
> Default value of variables is 1 to display all records
>
> Runtime
> Request.QueryString("skillname")
> Request.QueryString("resourceLoginID")
>
One solution is to create a view in SQL, that is exactly the
same as
your SELECT above. You then use the view name instead of the
table name
in your UPDATE statement. I know in the SQL world that this
is possible,
but I don't know if the Dreamweaver update behaviour will see
the views
stored on your SQL server.
Steve

Similar Messages

  • How to update flag in multiple tables using custom sql DB adapter

    hi all,
    I have a scenario: I want to update flags in multiple tables in DB2. I have used toplink update only to update all tabless after creating relationships between them. But that approach is not working as it couldnot detect emmisions with DB2 and update the complete record with blank values in other columns.
    So, i want to use custom sql now. Can anybody help in resolving the issue or in writing the custom sql.
    Regards
    Richa

    Dear SeánMacGC thanks for reply,
    But "a.changed" is not a field in GNMT_CUSTOMER_MASTER_CHG. what i am doing in this procedure is i am collecting bulck data and validating field by field from GNMT_CUSTOMER_MASTER_CHG with GNMT_CUSTOMER_MASTER table as their structure is same.. if v_name is not same as v_name_chg then i am setting changed flag to "Y" changed is "changed dbms_sql.varchar2_table" and updating GNMT_CUSTOMER_MASTER in bluck where changed flag ='Y'...
    type custRec is record
    n_cust_ref_no dbms_sql.number_table,
    v_name dbms_sql.varchar2_table,
    v_name_chg dbms_sql.varchar2_table,
    rowid rowidArray,
    *changed dbms_sql.varchar2_table*
    i cannot use simple SQL as i need to validate field for each records with GNMT_CUSTOMER_MASTER_CHG and insert into log file as well.....
    to run this procedure:
    execute DO_DC_NAME_UPDATE_OTHER_TAB.DO_NAME_UPDATE_OTHER_TAB;
    Thanks...

  • How to update fields in multiple tables ?

    Dear all,
    What is the fastest way to update fields in multiple tables... from a single change table...as below is my code to update the fields but it is taking long time to update as i need to keep log file if any one update fails....
    CREATE OR REPLACE
    package body DO_DC_NAME_UPDATE_OTHER_TAB
    as
    type rowidArray is table of rowid index by binary_integer;
    type custRec is record
    n_cust_ref_no dbms_sql.number_table,
    v_name dbms_sql.varchar2_table,
    v_name_chg dbms_sql.varchar2_table,
    rowid rowidArray,
    changed dbms_sql.varchar2_table
    procedure VALIDATE_CUST_NAME( p_n_cust_ref_no in number,p_v_name_chg in out NOCOPY varchar2, p_changed in out NOCOPY varchar2 )
    is
    begin
    FOR cr_cust IN (SELECT --a.n_cust_ref_no,a.v_name,UPD_V_NAME, a.n_weight,a.V_LASTUPD_INFTIM
    from GNMT_CUSTOMER_MASTER_CHG where n_cust_ref_no=p_n_cust_ref_no)
         loop
    -- v_name
    if nvl(trim(cr_cust.v_name),0) != nvl(p_v_name_chg,0)
    then
              p_v_name_chg := p_v_name_chg;
              --p_v_name := p_v_name;
              p_changed := 'Y';
    end if;
         end loop;
    end;
    procedure DO_NAME_UPDATE_OTHER_TAB
    is
    l_record custRec;
    l_array_size number default 20000;
    l_done boolean;
    l_cnt number default 1;
    cursor c is select a.n_cust_ref_no, a.v_name,a.v_name_chg, a.rowid, 'N'
                        from GNMT_CUSTOMER_MASTER_CHG a--,GNMT_CUSTOMER_MASTER b
                        where a.v_name <> trim(a.v_name_chg); --and  a.n_cust_ref_no in (1434775,1561181,1601870);
    begin
    open c;
    loop
    dbms_application_info.set_client_info
    ( 'processing ' || l_cnt || ' thru ' || (l_cnt+l_array_size-1) );
    fetch c bulk collect into l_record.n_cust_ref_no, l_record.v_name,l_record.v_name_chg,l_record.rowid, l_record.changed
    LIMIT l_array_size;
    l_done := c%notfound;
    --dbms_output.put_line ('message10');
    for i in 1 .. l_record.n_cust_ref_no.count
    loop
    VALIDATE_CUST_NAME(l_record.n_cust_ref_no(i),l_record.v_name_chg(i),l_record.changed(i) );
    end loop;
    --dbms_output.put_line (l_record.n_cust_ref_no(i)||','||l_record.V_OCCUP_CODE(i)||','||l_record.CHANGED(i));
    /*forall i in 1 .. l_record.n_cust_ref_no.count
    update GNMT_CUSTOMER_MASTER q
    set q.v_name = l_record.v_name_chg(i)
    where q.n_cust_ref_no = l_record.n_cust_ref_no(i)
    and trim(q.v_name) = l_record.v_name(i)
    and l_record.changed(i) = 'Y';*/
    -- update v_name in all the related tables
    forall i in 1 .. l_record.n_cust_ref_no.count
    update ADE_CUSTOMER_MASTER q
    set q.v_NAME = l_record.v_name_chg(i)
    where q.n_cust_ref_no = l_record.n_cust_ref_no(i)
    and trim(q.v_name) = l_record.v_name(i)
    and l_record.changed(i) = 'Y'
    and q.v_NAME is not null;
    forall i in 1 .. l_record.n_cust_ref_no.count
    update GNMT_POLICY_DETAIL q
    set q.v_NAME = l_record.v_name_chg(i)
    where q.n_cust_ref_no = l_record.n_cust_ref_no(i)
    and trim(q.v_name) = l_record.v_name(i)
    and l_record.changed(i) = 'Y'
    and q.v_NAME is not null;
    forall i in 1 .. l_record.n_cust_ref_no.count
    update GNMT_QUOTATION_DETAIL q
    set q.v_NAME =l_record.v_name_chg(i)
    where q.n_cust_ref_no = l_record.n_cust_ref_no(i)
    and trim(q.v_name) = l_record.v_name(i)
    and l_record.changed(i) = 'Y'
    and q.v_NAME is not null;
    forall i in 1 .. l_record.n_cust_ref_no.count
    update NBDT_BENEFICIARY q
    set q.V_NAME = l_record.v_name_chg(i)
    where q.n_cust_ref_no = l_record.n_cust_ref_no(i)
    and trim(q.V_NAME) = l_record.v_name(i)
    and l_record.changed(i) = 'Y'
    and q.v_NAME is not null;
    forall i in 1 .. l_record.n_cust_ref_no.count
    update PSDT_NOMINATION_TRANSACTION q
    set q.V_NAME = l_record.v_name_chg(i)
    where q.n_cust_ref_no = l_record.n_cust_ref_no(i)
    and trim(q.V_NAME) = l_record.v_name(i)
    and l_record.changed(i) = 'Y'
    and q.v_NAME is not null;
    forall i in 1 .. l_record.n_cust_ref_no.count
    update PSMT_POLICY_BENEFICIARY q
    set q.V_NAME = l_record.v_name_chg(i)
    where q.n_cust_ref_no = l_record.n_cust_ref_no(i)
    and trim(q.V_NAME) = l_record.v_name(i)
    and l_record.changed(i) = 'Y'
    and q.v_NAME is not null;
    commit;
    forall i in 1 .. l_record.n_cust_ref_no.count
    update PSMT_POLICY_TRUSTEE q
    set q.V_NAME = l_record.v_name_chg(i)
    where q.n_cust_ref_no = l_record.n_cust_ref_no(i)
    and trim(q.V_NAME) = l_record.v_name(i)
    and l_record.changed(i) = 'Y'
    and q.v_NAME is not null;
    forall i in 1 .. l_record.n_cust_ref_no.count
    update PSMT_QUOTATION_BENEFICIARY q
    set q.V_NAME = l_record.v_name_chg(i)
    where q.n_cust_ref_no = l_record.n_cust_ref_no(i)
    and trim(q.V_NAME) = l_record.v_name(i)
    and l_record.changed(i) = 'Y'
    and q.v_NAME is not null;
    forall i in 1 .. l_record.n_cust_ref_no.count
    update PSMT_QUOTATION_TRUSTEE q
    set q.V_NAME = l_record.v_name_chg(i)
    where q.n_cust_ref_no = l_record.n_cust_ref_no(i)
    and trim(q.V_NAME) = l_record.v_name(i)
    and l_record.changed(i) = 'Y'
    and q.v_NAME is not null;
    commit;
    forall i in 1 .. l_record.n_cust_ref_no.count
    update GNDT_BLACKLIST_DETAIL q
    set q.v_FNAME = l_record.v_name_chg(i)
    where q.n_cust_ref_no = l_record.n_cust_ref_no(i)
    and trim(q.v_FNAME) = l_record.v_name(i)
    and l_record.changed(i) = 'Y'
    and q.v_FNAME is not null;
    forall i in 1 .. l_record.n_cust_ref_no.count
    update INDT_LIAM_DETAIL q
    set q.v_FNAME = l_record.v_name_chg(i)
    where q.n_cust_ref_no = l_record.n_cust_ref_no(i)
    and trim(q.v_FNAME) = l_record.v_name(i)
    and l_record.changed(i) = 'Y'
    and q.v_FNAME is not null;
    commit;
    forall i in 1 .. l_record.n_cust_ref_no.count
    update GNMT_POLICY q
    set q.V_PAYER_NAME = l_record.v_name_chg(i)
    where q.N_PAYER_REF_NO = l_record.n_cust_ref_no(i)
    and trim(q.V_PAYER_NAME) = l_record.v_name(i)
    and l_record.changed(i) = 'Y'
    and q.V_PAYER_NAME is not null;
    commit;
    forall i in 1 .. l_record.n_cust_ref_no.count
    update GNMT_QUOTATION q
    set q.V_PAYER_NAME = l_record.v_name_chg(i)
    where q.N_PAYER_REF_NO = l_record.n_cust_ref_no(i)
    and trim(q.V_PAYER_NAME) = l_record.v_name(i)
    and l_record.changed(i) = 'Y'
    and q.V_PAYER_NAME is not null;
    commit;
    forall i in 1 .. l_record.n_cust_ref_no.count
    update GNMT_QUOTATION q
    set q.V_PROPOSER_NAME = l_record.v_name_chg(i)
    where q.N_PROPOSER_REF_NO = l_record.n_cust_ref_no(i)
    and trim(q.V_PROPOSER_NAME) = l_record.v_name(i)
    and l_record.changed(i) = 'Y'
    and q.V_PROPOSER_NAME is not null;
    forall i in 1 .. l_record.n_cust_ref_no.count
    update GNMT_POLICY q
    set q.V_PROPOSER_NAME = l_record.v_name_chg(i)
    where q.N_PROPOSER_REF_NO = l_record.n_cust_ref_no(i)
    and trim(q.V_PROPOSER_NAME) = l_record.v_name(i)
    and l_record.changed(i) = 'Y'
    and q.V_PROPOSER_NAME is not null;
    forall i in 1 .. l_record.n_cust_ref_no.count
    update CLMT_CLAIM_MASTER q
    set q.V_CLIENT_NAME = l_record.v_name_chg(i)
    where q.N_CLIENT_REF_NO = l_record.n_cust_ref_no(i)
    and trim(q.V_CLIENT_NAME) = l_record.v_name(i)
    and l_record.changed(i) = 'Y'
    and q.V_CLIENT_NAME is not null;
    forall i in 1 .. l_record.n_cust_ref_no.count
    update CLMT_CLAIM_MASTER q
    set q.V_INTIMATOR_NAME = l_record.v_name_chg(i)
    where q.N_CLIENT_REF_NO = l_record.n_cust_ref_no(i)
    and trim(q.V_INTIMATOR_NAME) = l_record.v_name(i)
    and l_record.changed(i) = 'Y'
    and q.V_INTIMATOR_NAME is not null;
    forall i in 1 .. l_record.n_cust_ref_no.count
    update PYMT_VOU_MASTER q
    set q.V_PAYEE_NAME = l_record.v_name_chg(i)
    where q.n_cust_ref_no = l_record.n_cust_ref_no(i)
    and trim(q.V_PAYEE_NAME) = l_record.v_name(i)
    and l_record.changed(i) = 'Y'
    and q.V_PAYEE_NAME is not null;
    /*forall i in 1 .. l_record.n_cust_ref_no.count
         INSERT INTO GNMT_CUSTOMER_MASTER_LOG
              (N_CUST_REF_NO, V_TITLE_CODE, V_NAME, D_BIRTH_DATE, V_SEX, V_RELIGION_CODE, V_NATION_CODE, V_OCCUP_CODE, V_ALIVE, V_SMOKER,
              N_NO_STICKS, D_DEATH_DATE, V_BUMI_NON_BUMI, V_AGE_ADMITTED, V_SHORT_NAME, V_FIRST_NAME, V_LAST_NAME, V_EMAIL, V_DESIGNATION,
              N_HEIGHT,N_WEIGHT,V_TITLE_CODE_CHG, V_NAME_CHG, D_BIRTH_DATE_CHG, V_SEX_CHG,V_RELIGION_CODE_CHG,V_NATION_CODE_CHG, V_OCCUP_CODE_CHG, V_ALIVE_CHG,
              V_SMOKER_CHG, N_NO_STICKS_CHG, D_DEATH_DATE_CHG,V_BUMI_NON_BUMI_CHG, V_AGE_ADMITTED_CHG, V_SHORT_NAME_Chg, V_FIRST_NAME_Chg,
              V_LAST_NAME_Chg, V_EMAIL_Chg, V_DESIGNATION_Chg,N_HEIGHT_Chg,N_WEIGHT_Chg, V_UPD_STATUS_DC,-- V_LASTUPD_PROG, V_LASTUPD_INFTIM,
              V_LASTUPD_USER_DC, V_LASTUPD_PROG_DC,V_LASTUPD_INFTIM_DC
              SELECT N_CUST_REF_NO, V_TITLE_CODE, V_NAME, D_BIRTH_DATE, V_SEX, V_RELIGION_CODE, V_NATION_CODE, V_OCCUP_CODE, V_ALIVE, V_SMOKER,
              N_NO_STICKS, D_DEATH_DATE, V_BUMI_NON_BUMI, V_AGE_ADMITTED, V_SHORT_NAME, V_FIRST_NAME, V_LAST_NAME, V_EMAIL, V_DESIGNATION,
              N_HEIGHT,N_WEIGHT,V_TITLE_CODE_CHG, V_NAME_CHG, d_birth_date_chg, V_SEX_CHG, V_RELIGION_CODE_CHG,V_NATION_CODE_CHG, V_OCCUP_CODE_CHG, V_ALIVE_CHG,
              V_SMOKER_CHG, N_NO_STICKS_CHG, D_DEATH_DATE_CHG, V_BUMI_NON_BUMI_CHG, V_AGE_ADMITTED_CHG, V_SHORT_NAME_Chg, V_FIRST_NAME_Chg,
              V_LAST_NAME_Chg, V_EMAIL_Chg, V_DESIGNATION_Chg,N_HEIGHT_Chg,N_WEIGHT_Chg--, V_LASTUPD_USER, V_LASTUPD_PROG, V_LASTUPD_INFTIM
              ,'PROCESSED'
              ,user,--P_USER,
              'DC_PAKAGE',
              sysdate--P_DATE
              FROM GNMT_CUSTOMER_MASTER_CHG where n_cust_ref_no =l_record.n_cust_ref_no(i)
              --and n_cust_ref_no not in (select n_cust_ref_no from GNMT_CUSTOMER_MASTER_LOG);*/
    exit when (l_done);
    l_cnt := l_cnt + l_array_size;
    end loop;
    commit;
    end;
    end;
    thank You

    Dear SeánMacGC thanks for reply,
    But "a.changed" is not a field in GNMT_CUSTOMER_MASTER_CHG. what i am doing in this procedure is i am collecting bulck data and validating field by field from GNMT_CUSTOMER_MASTER_CHG with GNMT_CUSTOMER_MASTER table as their structure is same.. if v_name is not same as v_name_chg then i am setting changed flag to "Y" changed is "changed dbms_sql.varchar2_table" and updating GNMT_CUSTOMER_MASTER in bluck where changed flag ='Y'...
    type custRec is record
    n_cust_ref_no dbms_sql.number_table,
    v_name dbms_sql.varchar2_table,
    v_name_chg dbms_sql.varchar2_table,
    rowid rowidArray,
    *changed dbms_sql.varchar2_table*
    i cannot use simple SQL as i need to validate field for each records with GNMT_CUSTOMER_MASTER_CHG and insert into log file as well.....
    to run this procedure:
    execute DO_DC_NAME_UPDATE_OTHER_TAB.DO_NAME_UPDATE_OTHER_TAB;
    Thanks...

  • Writeback using Multiple tables

    Hello Everyone,
    1. Can we create a report with writeback capabilities using Multiple tables (Say one fact and several dimensions)?.
    Whatever examples I'm seeing in blogs or forums with screesnshots , explains writeback Reports created with just one table.
    2. If writeback can work with reports using multiple tables, how do we need to change the XML scripts in custom message folder(insert and update)?
    any example ?
    Your suggestions are appreciated.
    Thanks

    You can only send one statement. Then if you want update many tables, you have to use a procedure/function in your SQL statement. For instance with a table function:
    http://gerardnico.com/wiki/database/oracle/table_function
    But I will advice you to do it with the simplest way possible: then one answer for one table to update.
    Success
    Nico

  • How to use multiple table in single control file?

    Hi,
    How to use multiple table and data file in sigle control file? I have a four table and four csv file i mean data file for that. I am running concurrent program to load the data from csv file to custom table. based on my input data file name, it has to take automatically from one control file.
    Can anyone share with me how can i acheive this?
    Thanks

    Hi,
    Can't we acehive like below. I don't this exactly corrcect.
    OPTIONS (SKIP=1)
    LOAD DATA
    INFILE << file name 1 >>
    APPEND INTO TABLE XXCZ_VA_SAMPLE1
    FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"' TRAILING NULLCOLS
         PARENT_ITEM               "TRIM(BOTH FROM :PARENT_ITEM)"
    LOAD DATA
    INFILE << file name 2 >>
    APPEND INTO TABLE XXCZ_VA_SAMPLE2
    FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"' TRAILING NULLCOLS
         ITEM_NUMBER               "TRIM(BOTH FROM :ITEM_NUMBER)"
    )Edited by: orasuriya on Sep 14, 2009 3:03 AM

  • Using table comparison can we use multiple tables as source?

    Using table comparison can we use multiple tables as source?
    Thank you very much for the helpful info.

    Table Comparison
    1) Input Data coming in
    2) Comparison table (table to which the data is compared)
    3) Output (input rows with respective opcodes based on the comparison result of input dataset with the comparison table)
    If your question is whether table comparison can accept union/join of multiple table sources, you can achieve by using merge/query transforms and then feeding to table comparison. Here, you have to be careful about choosing the primary keys inside table comparison

  • Reports using multiple tables

    I am trying to create a report using portal that use links between multiple columns. The info I want is mainly in two tables. Some of the info in the table is numeric (Foreign Keys). I want to display them in readable format so set up joins to the respective parent tables. When I do this the result only produces 12 lines of output irrespective of the number of lines I set per page. When I show only the data from the main tables, without the joins to the other parent tables, i.e. the foreign keys as numbers I get all the rows. I have tried to create the report by using all three options given but get the same result.
    I am using 9iAS verison 1.0.2.0 and Portal version 3.0.7.
    Can someone please explain why this happens and how I can solve this problem urgently.

    Hi Ashok,
    Sorry for posting the solution with delay. Actually I ran into the similar situation and upon deep analysis, I could crack it., the very next day.
    This is how your write back template should be for updating on multiple tables
    <?xml version="1.0" encoding="utf-8" ?>
    <WebMessageTables xmlns:sawm="com.siebel.analytics.web/message/v1">
    <WebMessageTable lang="en-us" system="WriteBack" table="Messages">
    <WebMessage name="WRITE">
    <XML>
    <writeBack connectionPool="Oracle Data Warehouse Connection Pool">
    <insert> </insert>
    <update> UPDATE FACT SET COUNT = '@{c4}', W_UPDATE_DT = CURRENT_DATE
    WHERE EXISTS (SELECT ROW_WID FROM DIM WHERE DIM.ROW_WID = FACT.DIM_WID AND
    DIM.X = '@{c1}' AND DIM.Y= '@{c2}' AND DIM.Z = '@{c3}' ) AND EXISTS (SELECT ROW_WID FROM DT WHERE DT.ROW_WID = FACT.DT_WID AND DT.PER_NAME_YEAR = '@{c0}') </update>
    </writeBack>
    </XML>
    </WebMessage>
    </WebMessageTable>
    </WebMessageTables>
    =====
    Using exits, will improve the performance.
    Hope it helps. If yes, pls award points. Thanks
    Regards,
    Sarat Nallapati

  • Left outer join using multiple table

    Hi,
    I am trying to use left outer join with multiple tables , the join condition will be based on  PERNR and BEGDA & ENDA for each infotype in selection screen.
      select pa00~pernr pa00~begda pa00~endda pa00~massn pa00~massg pa00~stat2 pa00~aedtm pa00~uname
        pa01~begda pa01~endda pa01~bukrs pa01~persg pa01~persk pa01~mstbr pa01~ename pa01~aedtm pa01~uname
        pa02~begda pa02~endda pa02~nachn pa02~vorna pa02~midnm pa02~aedtm pa02~uname
        pa016~begda pa016~endda pa016~cttyp pa016~aedtm pa016~uname
        into CORRESPONDING FIELDS OF TABLE i_pall
        from  ( PA0000 as pa00 left OUTER JOIN pa0001 as pa01 on pa00~pernr = pa01~pernr )
        left OUTER JOIN pa0002 as pa02 on pa00~pernr eq pa02~pernr )
        left OUTER JOIN  pa0016 as pa016 on pa00~pernr eq pa016~pernr )
        where pa00~pernr in S_pernr
        AND pa00~begda in s_bg0000
        and pa00~endda in s_nd0000.
    but this fails  to fetch the value of begda enda from each pa0000,pa0001,pa0002,pa0016.
    Please help!
    Monirul

    Why don't you use the standard logical database PNPCE and then Provide statement?

  • How to use multiple tables in DRIVING_SITE

    Hi All,
    I see very bad performance with my query having dblinks to remote database.
    How can I use DRIVING_SITE for multiple remote tables here?
    Does it it useful to use on DRIVING_SITE multiple tables?
    What is impact of using ORDER BY on local table column ( table A in below case) in the query?
    SELECT A.col1, B.col2 , C.col3
    FROM A, B@dblink1, C@dblink1, D@dblink2
    WHERE <few join conditions>
    ORDER BY A.col1 ;
    Join conditions in above query is taken care to have better performance. But from our analysis it is understood that poor performance is due to DB Links to remoate database. What is best approach to get good performance with DB Links?
    Regards,
    Ram

    http://download.oracle.com/docs/cd/E11882_01/server.112/e17120/ds_appdev004.htm#ADMIN12196
    Will give you an idea of where to start.

  • How to set aggregation rule (SUM) to a query which uses multiple tables

    Hi,
    I have a doubt like i have a query .i want to get the sum of few columns in that..how can i achieve it as it joins multiple tables . i am posting the query under this. please help me to resolve this. i need to get summation of column which is marked in bold . i am so sorry to post such a big query.. thanks in advance.
    SELECT DISTINCT
        SAS.ACCOUNT_MONTH_NO,
        SAS.BILL_TO_MAJOR_SALES_CHANNEL,
        SAS.BUS_AREA_ID,
        SAS.CUST_NAME,
        SAS.PART_NO,
        SAS.PART_DESC,
        SAS.PRODUCT_CLASS_CODE,
        SAS.SUPER_FAMILY_CODE,
        *SAS.NET_SALES_AMT_COA_CURR,* 
      *SAS.GROSS_SALES_AMT_COA_CURR*,
        *SAS.SHIPPED_QTY*,
        SAS.SRCE_SYS_ID,
        GWS.SRC_LOCATION,
        GWS.PART_CF_PART_NUMBER,
        GWS.ANALYST_COMMENTS,
        NVL(GWS.CLAIM_QUANTITY,0) AS *CLAIM_QUANTITY*,
        GWS.CUSTOMER_CLAIM_SUBMISSION_DATE,
        GWS.CLAIM_TYPE,
        GWS.CREDIT_MEMO_NO,
        NVL(GWS.CREDIT_MEMO_AMT,0) AS *CREDIT_MEMO_AMT*,
        GWS.TRANS_CREATED_BY,
        GWS.COMPONENT_CODE,
        GWS.DATE_OF_THE_FAILURE,
        GWS.DATE_PART_IN_SERVICE,
        GWS.PROBLEM_CODE,
        NVL(GWS.TOT_AMT_REVIEWED_BY_CA,0) AS *TOT_AMT_REVIEWED_BY_CA*,
        GWS.REGION
      FROM
    SELECT
            TO_CHAR(A.STATUS_DATE, 'YYYYMM') AS ACCOUNT_MONTH_NO,
            A.LOCATION_ID SRC_LOCATION,
            A.CF_PN PART_CF_PART_NUMBER,
            A.ANALYST_COMMENTS,
            A.CLAIM_QUANTITY, 
         A.CUST_CLAIM_SUBM_DATE CUSTOMER_CLAIM_SUBMISSION_DATE,
            A.CLAIM_TYPE,
            A.CREDIT_MEMO_NO,
            A.CREDIT_MEMO_AMT,
            A.CREATED_BY TRANS_CREATED_BY,
            A.FAULT_CODE COMPONENT_CODE,
            A.PART_FAILURE_DATE DATE_OF_THE_FAILURE,
            A.PART_IN_SERVICE_DATE DATE_PART_IN_SERVICE,
            A.FAULT_CODE PROBLEM_CODE,
            A.TOT_AMT_REVIEWED_BY_CA,
            A.PART_BUS_AREA_ID AS BUS_AREA_ID,
            A.PART_SRC_SYS_ID,
            C.CUST_NAME,
            C.BILL_TO_MAJOR_SALES_CHANNEL,
            P.PART_NO,
            P.PART_DESC,
            P.PRODUCT_CLASS_CODE,
            L.REGION
          FROM
            EDWOWN.MEDW_BIS_DTL_FACT A,
            EDWOWN.EDW_MV_DB_CUST_DIM C,
            EDWOWN.EDW_BUSINESS_LOCATION_DIM L,
            EDWOWN.EDW_V_ACTV_PART_DIM P
          WHERE
            A.PART_KEY                       = P.PART_KEY
          AND A.CUSTOMER_KEY                 = C.CUSTOMER_KEY
          AND A.LOCATION_KEY                 = L.LOCATION_KEY
          AND A.PART_SRC_SYS_ID              = 'SOMS'
          AND A.PART_BUS_AREA_ID             = 'USA'
          AND C.BILL_TO_MAJOR_SALES_CHANNEL <> 'IN'
        GWS,
          SELECT
            A.ACCOUNT_MONTH_NO,
            A.BUS_AREA_ID,
            A.NET_SALES_AMT_COA_CURR,
            A.GROSS_SALES_AMT_COA_CURR,
            A.SHIPPED_QTY,
            B.BILL_TO_MAJOR_SALES_CHANNEL,
            A.SRCE_SYS_ID,
            B.CUST_NAME,
            D.PART_NO,
            D.PART_DESC,
            D.PRODUCT_CLASS_CODE,
            D.SUPER_FAMILY_CODE
          FROM
            SASOWN.SAS_V_CORP_SHIP_FACT A,
            SASOWN.SAS_V_CORP_CUST_DIM B,
            SASOWN.SAS_V_CORP_LOCN_DIM C,
            SASOWN.SAS_V_CORP_PART_DIM D
          WHERE
                C.DIVISION_CODE = A.DIVISION_CODE
            AND
                B.B_HIERARCHY_KEY = A.B_HIERARCHY_KEY
            AND
                D.PART_NO = A.PART_NO
            AND
                A.SRCE_SYS_ID = 'SOMS'
            AND
                A.BUS_AREA_ID = 'USA'
            AND
                B.BILL_TO_MAJOR_SALES_CHANNEL <> 'IN'
        SAS
      WHERE
        SAS.ACCOUNT_MONTH_NO              = GWS.ACCOUNT_MONTH_NO(+)
      AND SAS.BILL_TO_MAJOR_SALES_CHANNEL = GWS.BILL_TO_MAJOR_SALES_CHANNEL(+)
      AND SAS.BUS_AREA_ID                 = GWS.BUS_AREA_ID(+)
      AND SAS.PRODUCT_CLASS_CODE          = GWS.PRODUCT_CLASS_CODE(+);thanks in advance
    aswin

    You get rid of the distinct.
    You put sum() around your starred items.
    You put all the remaining columns in a GROUP BY clause.
    You hope that that none of the other tables has more than one row that matches the SAS table, which would cause you to count that row more than once.

  • How we can update cube using Change Tables as Source

    I have created a cube using source tables. I have also created change table (feature of 9i) based on source table. which store new changes to souce table. I want to load cube using one mapping from source table or change table based on the validity of the change table.
    Is that possible to do this? have anybody implemented change table to incremental load of cube?
    Sanjiv Tyagi

    Hi Sanjiv,
    I can think of 2 ways of doing this:
    one is using a single mapping with a pre mapping process to determine whether the change table is valid. If yes the pre mapping process creates a view (that is also referenced in the mapping itself) on top of the change table (select * from change_table), if this is not valid then the view will be on the source table (select * from source). After this pre map process the mapping runs on which ever view exists and loads the data.
    the second way is using process flow and 2 mappings. In PF you have a PL/SQL call that verifies which data to use. If the change table is correct, that will give success and uses the mapping on the change table. If the return is Error then you use the mapping on the source table.
    I have not implemented these solutions, however I think these are 2 ways of getting it to behave like you would want to...
    Hope this gives you some ideas,
    Jean-Pierre

  • Optimization of an update that uses multiple selects on the same table

    Oracle version : 10g
    Hello,
    I have created an UPDATE statement which uses two selects on a single table to do an update according to date criteria.
    Due to the fact that the update has different criteria for updating according to whether the date falls within one of two ranges
    (future or past) two selects were used together with a union between them to unite the results.
    The end result is of course two full table scans and a poorly performing execution.
    The goal is to update a field XDEL (type number) based on a date column value (column XDATE) where the dates of interest
    fall both in the past (less than sysdate minus 45 days) and in the future (greater than sysdate +90 days). For records with XDATE
    values within these ranges, I wish to set field XDEL=1
    For records in the future (>=sysdate+90):
    for a unique combination of XNAME+XCODE, where XDATE is within the date range for update, set XDEL=1
    but for a non-unique combination of XNAME+XCODE+XDATE, update XDEL=1 only for the 'oldest' future record, ie update XDEL for MIN(XDATE) only
    For records in the future (< sysdate+45):
    for a unique combination of XNAME+XCODE, where XDATE is within the date range for update, set XDEL=1
    for a non-unique combination of XNAME+XCODE, update XDEL=1 only for the 'newest' past record, ie update XDEL for MAX(XDATE) only
    The combination of XNAME+XCODE XDATE is unique. As an example of the 'in the past' scenario:
    XNAME | XCODE | XDATE
    ================
    1. AAAA ~ 002 ~ 01/01/2006
    2. AAAA ~ 002 ~ 02/01/2006
    3. AAAA ~ 002 ~ 03/01/2006
    4. XXXX ~ 123 ~ 02/01/2006
    Here, we would update XDEL in record 3. as it corresponds to MAX(XDATE) for the GROUP AAA002 (and we would also update record 4. as a unique record that meets the criteria)
    As an example of the 'in the future' scenario:
    XNAME | XCODE | XDATE
    ================
    1. HHHH ~ 002 ~ 01/01/2011
    2. HHHH ~ 002 ~ 02/01/2011
    3. HHHH ~ 002 ~ 03/01/2011
    4. XXXX ~ 123 ~ 02/01/2011
    Here, we would update XDEL in record 1. as it corresponds to MIN(XDATE) for the GROUP HHHH002 (and of course 4. as a unique record that meets the criteria)
    Here is a query that works, but is slow:
    UPDATE TAB1 SET XDEL=1 WHERE (XNAME,XCODE,XDATE) IN ((SELECT XNAME,XCODE,max(XDATE) FROM TAB1 WHERE XDATE < sysdate-45 GROUP BY XNAME,XCODE) UNION (SELECT XNAME,XCODE,min(XDATE) from TAB1 WHERE XDATE >= sysdate+90 GROUP BY XNAME,XADDR));
    XDATE is a DATE type
    XCODE and XADDR are VARCHAR2
    XDEL is number type
    Any ideas would be greatly appreciated.

    Here is a suggestion. The code is not tested.
    update tab1 t1
       set xdel = 1
    where exists (select null
                     from (
                            select xname,
                                   xcode,
                                   max(case when xdate < sysdate-45 then xdate else null end) xdate1,
                                   min(case when xdate >= sysdate+90 then xdate else null end) xdate2
                              from tab1
                             group by xname, xcode
                          ) t
                    where t1.xname = t.xname
                      and t1.xcode = t.xcode
                      and (t1.xdate = t.xdate1 or t1.xdate = t.xdate2))

  • How to use multiple tables in developing one Graph in Endeca Integrator

    We have the requirement where we want to show the matrix for a particular entity which is coming from two separate table, there is a join which is possible on both the tables to get the correct data. But we are not able to find how to use data from two tables. We can create the SQL query with all the joining conditions but there are many tables which are involved so performance of query will be a problem. Is there any way in Endeca where I can create two data sources using two separate queries and while showing the matrix , I can join both the tables to get the matrix .

    You have not mentioned the version of Endeca that is used for your application. Joins are recently introduced in version 2.3 and could be used for avoiding complex DEFINE analytical statements. For this to work, the data should be present in the same dgraph and a single data source in Studio should point to data from both sources.
    These may not yet be the type of SQL joins that you may expect them to be as performing complex joins is also costly in Endeca. Hope you are not expecting to join huge data sets.
    The best possible solution I could think for addressing this problem is to load denormalized data (at least for now) into Endeca and do aggregations in queries. We can denormalize data in multiple ways even using ETL tools not just SQL queries as the above comment states.

  • How can I save downloaded iOS system updates when using multiple iPhones

    I have multiple iPhones, and every time I want to update them, I have to wait forever for these downloads to transfer. The update downloads, but is not saved so that I can use it for another iPhone, requiring me to download the same file yet again, and again, and again, wasting my time. Any ideas or is this a lost cause?
    Message was edited by: Ron Yochum

    Not sure about a Mac, but on Windows it does save the file to a location in the users profile area and if the phones are identical (eg: both 3GS) I have been able to copy the file to the location in the other users profile and have it use it to update.

  • Reports using multiple tables (Reposting)

    After no response for two weeks I am reposting this. Can anyone please help me on this one?
    I am trying to create a report using portal that use links between multiple columns. The info I want is mainly in two tables. Some of the info in the table is numeric (Foreign Keys). I want to display them in readable format so set up joins to the respective parent tables. When I do this the result only produces 12 lines of output irrespective of the number of lines I set per page. When I show only the data from the main tables, without the joins to the other parent tables, i.e. the foreign keys as numbers I get all the rows. I have tried to create the report by using all three options given but get the same result.
    I am using 9iAS verison 1.0.2.0 and Portal version 3.0.7.
    Can someone please explain why this happens and how I can solve this problem urgently.

    Hello,
    It looks like someone answered your question in thread UIX tutorial
    I would also recommend reading the Databinding chapter and the Business Components for Java Integration chapter under UIX Developer's Guide and Reference.
    Also, you can download demos from this page:
    http://otn.oracle.com/products/ids/uix/content.html

Maybe you are looking for

  • J2ME: can you clear the key pressed buffer on a cell?

    I am having trouble with keypressed. I am writing a cell phone game in MIDP 2.0. Basically its the standard GameCanvas setup, where you have a main game loop and it calls your input function. The input function then does: int keyStates = getKeyStates

  • Help installing photoshop elements 11?

    I got a wacom intuos tablet which came with photoshop elements 11. I downloaded it, but am having trouble going through the installation process. Every time I try, it gets really close to finishing installing, but then says there's an error and it st

  • Resolution of my macbook changed to 256

    I was connected via bluetooth to another mac. When the other mac tried to send me a file via blue tooth the resolution of my computer changed to 256. I have tried to do many things to change it back and nothing works. Anyone has idea of what is happe

  • Itunes 5 CD Installshield Error?

    Hi I have just got my black nano and have put the cd rom in it says it can't install due to an installshield error. What can I do now? and is this the reason why itunes 5 wont play songs on my computer? Greg

  • Upgrading Ram on Mac Pro (mid 2010) 8 Core

    I currently have 8gb ddr3 1066 and 8gb ddr3 1333 both ECC putting me at 16 gb ram. When i purchased them i didn't know there was a difference in ram. To upgrade do i need to buy x2 8gb or can i buy a single. When installing this a few years ago i lea