UNION ALL affect on recordset updateability

Hi
We have a legacy database that was hosted in SQL Server 2000 which is now hosted in SQL Server 2008 R2 in SQL 2000 compatibility mode.
A legacy application accesses a table in the database via a stored procedure and creates a disconnected recordset. The SQL that is executed by the stored procedure is like this (much simplified) :
select Id, colA, colB from MYTABLE where Id IN (1,2)
UNION ALL
select Id, colA, colB from MYTABLE where Id BETWEEN @a and @b
When the database was hosted in SQL Server 2000 the recordset was updateable e.g. colA could be assigned a new value but when hosted in SQL Server 2008 R2 it is not; the program gets error 'Multiple step operation generated errors...'. These changes to the
disconnected recordset are temporary and used to compare against another recordset at a later time to perform the appropriate insert/update/delete action.
I've tried both SQLOLEDB.1 and SQLNCLI10 data providers.
Is there a way I can continue to get the SQL 2000 behaviour so that I'm not forced to change the code (SQL and/or program) immediately?
Thanks
Craig

Hello CNicho,
Since this issue is related SQL Server and after confirming with SQL Server experts, I suggest that you could post it to:
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/home?forum=transactsql
This current forum you post to is used to discuss Data platform development using ADO.NET managed providers, especially System.Data.SqlClient, System.Data.Odbc and System.Data.Oledb.
Regards.
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.

Similar Messages

  • Update..Union All   Vs  multiple individual Updates -- performance?

    Hi All,
    I have a procedure which fetches data from a remote database. It performs multiple updates on a single table. Will it be any better in terms of performance if I have all the updates combined into one update using a UNION ALL.
    Please advice in terms of performance or any other options of improving performance..
    INSERT INTO BALAN (
    deal_id, projection_period, deposit, spread
    SELECT DEALID, 1, nvl(to_char(sum(avg_deposit) / count(avg_deposit), '99999999999.99'), 0) deposit,
    nvl(to_char(sum(avg_float)/ count(avg_float), '99999999999.99'), 0) spread
    FROM BILLING.CAP_ANST1@LINK_BILLN01D a
    WHERE account = AACCOUNT
    AND group_ind = GROUPID
    AND stamp = v_stamp_date
    UNION ALL
    SELECT DEALID, 3, nvl(to_char(sum(avg_deposit) / count(avg_deposit), '99999999999.99'), 0) deposit,
    nvl(to_char(sum(avg_float)/ count(avg_float), '99999999999.99'), 0) spread
    FROM BILLING.CAP_ANST1@LINK_BILLN01D
    WHERE account = AACCOUNT
    AND group_ind = GROUPID
    AND stamp >= v_stamp_date_minus_2
    UNION ALL
    SELECT DEALID, 6, nvl(to_char(sum(avg_deposit) / count(avg_deposit), '99999999999.99'), 0) deposit,
    nvl(to_char(sum(avg_float)/ count(avg_float), '99999999999.99'), 0) spread
    FROM BILLING.CAP_ANST1@LINK_BILLN01D
    WHERE account = AACCOUNT
    AND group_ind = GROUPID
    AND stamp >= v_stamp_date_minus_5
    UNION ALL
    SELECT DEALID, 12, nvl(to_char(sum(avg_deposit) / count(avg_deposit), '99999999999.99'), 0) deposit,
    nvl(TO_CHAR(SUM(avg_float)/ COUNT(avg_float), '99999999999.99'), 0) spread
    FROM billing.CAP_ANST1@LINK_BILLN01D a
    WHERE account = AACCOUNT
    AND group_ind = GROUPID
    AND stamp >= v_stamp_date_minus_11;
    ---------------- OR---------------------------------
    INSERT INTO IDM.balan
    (DEAL_id, PROJECTION_PERIOD, deposit, spread)
    SELECT DEALID, 1, nvl(SUM (avg_deposit) / COUNT (avg_deposit), 0) deposit,
    nvl(SUM (avg_float) / COUNT (avg_float),0) spread
    FROM BILLING.CAP_ANST1@LINK_BILLN01D a
    WHERE aaccount = a.ACCOUNT
    AND a.group_ind = groupid
    AND stamp = (SELECT to_date(value, 'MM/DD/YYYY')
    FROM APP_ENV
    WHERE name = 'CUR_STAMP');
    INSERT INTO IDM.balan
    (DEAL_id, projection_period, deposit, spread)
    SELECT DEALID, 3, nvl( TO_CHAR(SUM (avg_deposit) / COUNT (avg_deposit), '99999999999.99'),0) deposit,
    nvl( TO_CHAR(SUM (avg_float)/ COUNT (avg_float), '99999999999.99'),0) spread
    FROM BILLING.CAP_ANST1@LINK_BILLN01D a
    WHERE aaccount = a.ACCOUNT
    AND a.group_ind = groupid
    AND stamp >= (SELECT ADD_MONTHS (to_date(value, 'MM/DD/YYYY'), -2)
    FROM APP_ENV
    WHERE name = 'CUR_STAMP');
    INSERT INTO IDM.balan
    (DEAL_ID, projection_period, deposit, spread)
    SELECT DEALID, 6,
    nvl( TO_CHAR(SUM (avg_deposit) / COUNT (avg_deposit), '99999999999.99'),0) deposit,
    nvl( TO_CHAR(SUM (avg_float)/ COUNT (avg_float), '99999999999.99'),0) spread
    FROM billing.CAP_ANST1@LINK_BILLN01D a
    WHERE a.ACCOUNT = aaccount
    AND a.group_ind = groupid
    AND stamp >= (SELECT ADD_MONTHS (to_date(value, 'MM/DD/YYYY'), -5)
    FROM APP_ENV
    WHERE name = 'CUR_STAMP');
    INSERT INTO IDM.balan
    (DEAL_ID, projection_period, deposit, spread)
    SELECT DEALID, 12, nvl( TO_CHAR(SUM (avg_deposit) / COUNT (avg_deposit), '99999999999.99'),0) deposit,
    nvl( TO_CHAR(SUM (avg_float)/ COUNT (avg_float), '99999999999.99'),0) spread
    FROM billing.CAP_ANST1@LINK_BILLN01D a
    WHERE aaccount = a.ACCOUNT
    AND a.group_ind = groupid
    AND stamp >= (SELECT ADD_MONTHS (to_date(value, 'MM/DD/YYYY'), -11)
    FROM APP_ENV
    WHERE name = 'CUR_STAMP');
    Thanks in advance!
    Appreciate your help!
    Thanks
    Bob

    Hi Bob,
    Maybe I misunderstood, but couldn't you just:
    insert into balan(deal_id
                     ,projection_period
                     ,deposit
                     ,spread)
       select dealid
             ,case
                 when stamp  = v_stamp_date          then 1
                 when stamp >= v_stamp_date_minus_2  then 3
                 when stamp >= v_stamp_date_minus_5  then 6
                 when stamp >= v_stamp_date_minus_11 then 12
              end
                 projection_period
             ,nvl(to_char(sum(avg_deposit) / count(avg_deposit), '99999999999.99')
                 ,0)
                 deposit
             ,nvl(to_char(sum(avg_float) / count(avg_float), '99999999999.99'), 0)
                 spread
         from billing.cap_anst1@link_billn01d a
        where account = aaccount
          and group_ind = groupid
          and stamp between v_stamp_date_minus_11 and v_stamp;Regards
    Peter

  • Updatable Materialized View with Union ALL

    (please don't ask about db structure)
    DB: 11gR2
    create table table_1  (
        id number primary key,
        val varchar2(100)
    create table table_2  (
        id number primary key,
        val varchar2(100)
    insert into table_1(id) values (0);
    insert into table_1(id) values (2);
    insert into table_1(id) values (3);
    insert into table_1(id) values (4);
    insert into table_1(id) values (5);
    insert into table_2(id) values (10);
    insert into table_2(id) values (12);
    insert into table_2(id) values (13);
    insert into table_2(id) values (14);
    insert into table_2(id) values (15);
    update table_1 set val='Table1 val:'||id;
    update table_2 set val='Table2 val:'||id;
    create view v_table_all as
    select * from table_1
    view V_TABLE_ALL created.
    select * from v_table_all;
    ID                     VAL                                                                                                 
    0                      Table1 val:0                                                                                        
    2                      Table1 val:2                                                                                        
    3                      Table1 val:3                                                                                        
    4                      Table1 val:4                                                                                        
    5                      Table1 val:5                                                                                        
    select column_name, updatable, insertable, deletable
    from user_updatable_columns
    where table_name = 'V_TABLE_ALL'
    COLUMN_NAME                    UPDATABLE INSERTABLE DELETABLE
    ID                             YES       YES        YES      
    VAL                            YES       YES        YES      
    update v_table_all set val='XXX changed' where id = 3;
    1 row updated.
    select * from table_1;
    ID                     VAL                                                                                                 
    0                      Table1 val:0                                                                                        
    2                      Table1 val:2                                                                                        
    3                      XXX changed                                                                                         
    4                      Table1 val:4                                                                                        
    5                      Table1 val:5                                                                                        
    rollback;
    select * from table_1;
    ID                     VAL                                                                                                 
    0                      Table1 val:0                                                                                        
    2                      Table1 val:2                                                                                        
    3                      Table1 val:3                                                                                        
    4                      Table1 val:4                                                                                        
    5                      Table1 val:5                                                                                        
    create or replace view v_table_all as
    select * from table_1
    union select * from table_2;
    view V_TABLE_ALL created.
    select * from v_table_all;
    ID                     VAL                                                                                                 
    0                      Table1 val:0                                                                                        
    2                      Table1 val:2                                                                                        
    3                      Table1 val:3                                                                                        
    4                      Table1 val:4                                                                                        
    5                      Table1 val:5                                                                                        
    10                     Table2 val:10                                                                                       
    12                     Table2 val:12                                                                                       
    13                     Table2 val:13                                                                                       
    14                     Table2 val:14                                                                                       
    15                     Table2 val:15  
    select column_name, updatable, insertable, deletable
    from user_updatable_columns
    where table_name = 'V_TABLE_ALL'
    COLUMN_NAME                    UPDATABLE INSERTABLE DELETABLE
    ID                             NO        NO         NO       
    VAL                            NO        NO         NO       
    trying update:
    update v_table_all set val='XXX changed' where id = 3;
    SQL-Fehler: ORA-01732: Datenmanipulationsoperation auf dieser View nicht zulässig
    01732. 00000 -  "data manipulation operation not legal on this view"
    *Cause:   
    *Action:
    drop view v_table_all;
    view V_TABLE_ALL dropped.all is ok before this point.
    now we want create a new materialized view with some query
    create  materialized view v_table_all
    as
    select * from table_1
    union all select * from table_2 ;
    materialized view V_TABLE_ALL created.
    select column_name, updatable, insertable, deletable
    from user_updatable_columns
    where table_name = 'V_TABLE_ALL'
    COLUMN_NAME                    UPDATABLE INSERTABLE DELETABLE
    ID                             YES       YES        YES      
    VAL                            YES       YES        YES       it seems to be ok with update.
    but...
    update v_table_all set val='XXX changed' where id = 3;
    SQL-Fehler: ORA-01732: Datenmanipulationsoperation auf dieser View nicht zulässig
    01732. 00000 -  "data manipulation operation not legal on this view"
    *Cause:   
    *Action:How can solve this issue??
    Any suggestion

    Looks like user_updatable_columns sort of thinks the MV is just a table - I don't know about that...
    An MV on a single table can be updated - I tried that and it works:
    create materialized view mv_table_1 for update
    as
    select * from table_1;I noticed [url http://download.oracle.com/docs/cd/E11882_01/server.112/e16579/advmv.htm#sthref294]examples stating the UNION ALL needs a "marker" so Oracle can know from the data which source table a row in the MV originates from - like this:
    create materialized view v_table_all for update
    as
    select 'T1' tab_id, table_1.* from table_1
    union all
    select 'T2' tab_id, table_2.* from table_2 ;But that also fails (the "marker" requirement was specifically for FAST REFRESH, so it was just a long shot ;-) )
    What are you planning to do?
    <li>Create the MV.
    <li>Update records in the MV - which then is no longer consistent with the source data.
    <li>Schedule a complete refresh once in a while - thereby overwriting/losing the updates in the MV.
    If that is the case, I suggest using a true table rather than an MV.
    <li>Create table t_table_all as select ... .
    <li>Update records in the table - which then is no longer consistent with the source data.
    <li>Schedule a job to delete table and insert into table select ... once in a while - thereby overwriting/losing the updates in the table.
    In other words a kind of "do it yourself MV".
    I cannot see another way at the moment? But perhaps try in the data warehousing forum - the people there may have greater experience with MV's ;-)

  • Materialized view - REFRESH FAST ON COMMIT - UNION ALL

    In a materialized view which uses REFRESH FAST ON COMMIT to update the data, how many UNION ALL can be used.
    I am asking this question because my materialized view works fine when there are only 2 SELECT statement (1 UNION ALL).
    Thank you.

    In a materialized view which uses REFRESH FAST ON COMMIT to update the data, how many UNION ALL can be used.As far as I remember you can have 64K UNIONized selects.
    I am asking this question because my materialized view works fine when there are only 2 SELECT statement (1 UNION ALL).Post SQL that does not work.

  • Inconsistent SQL results when using View with UNION-ALL and table function

    Can any of you please execute the below scripts and check the output. In the table type variable, I am adding 4 distinct object ids, where as in the result, I get only the row pertaining to last id in the table type variable. Same row is returned 4 times (4= number of values in the table type).
    This scenario is occurring in our product with a SQL with exactly same pattern. I could simulate the same issue with the sample script I have provided.
    Database version: 11.2.0.3 Enterprise Edition, Single node
    Thank you.
    CREATE TABLE TEMP_T1 AS SELECT * FROM ALL_OBJECTS;
    CREATE TABLE TEMP_T2 AS SELECT * FROM ALL_OBJECTS;
    UPDATE TEMP_T2 SET OBJECT_ID = OBJECT_ID * 37;
    CREATE UNIQUE INDEX TEMP_T1_U1 ON TEMP_T1(OBJECT_ID);
    CREATE UNIQUE INDEX TEMP_T2_U1 ON TEMP_T2(OBJECT_ID);
    CREATE OR REPLACE VIEW TEMP_T1T2_V AS
    SELECT * FROM TEMP_T1 UNION ALL SELECT * FROM TEMP_T2;
    CREATE OR REPLACE TYPE TEMP_OBJ_TYPE AS OBJECT (OBJ_ID NUMBER);
    CREATE OR REPLACE TYPE TEMP_OBJ_TAB_TYPE IS TABLE OF TEMP_OBJ_TYPE;
    SET SERVEROUTPUT ON;
    DECLARE
    TYPE TEMP_T1T2_V_ROW_TAB_TYPE IS TABLE OF TEMP_T1T2_V%ROWTYPE;
    TEMP_T1T2_V_ROW_TAB TEMP_T1T2_V_ROW_TAB_TYPE;
    TEMP_OBJ_TAB TEMP_OBJ_TAB_TYPE := TEMP_OBJ_TAB_TYPE();
    PROCEDURE ADD_TO_TEMP_OBJ_TAB(OBJ_ID IN NUMBER) IS
    BEGIN
    TEMP_OBJ_TAB.EXTEND;
    TEMP_OBJ_TAB(TEMP_OBJ_TAB.LAST) := TEMP_OBJ_TYPE(OBJ_ID);
    END;
    BEGIN
    ADD_TO_TEMP_OBJ_TAB(100);
    ADD_TO_TEMP_OBJ_TAB(116);
    ADD_TO_TEMP_OBJ_TAB(279);
    ADD_TO_TEMP_OBJ_TAB(364);
    DBMS_OUTPUT.PUT_LINE('=====================');
    FOR I IN TEMP_OBJ_TAB.FIRST..TEMP_OBJ_TAB.LAST
    LOOP
    DBMS_OUTPUT.PUT_LINE('OBJ_ID = '||TEMP_OBJ_TAB(I).OBJ_ID);
    END LOOP;
    DBMS_OUTPUT.PUT_LINE('---------------------');
    SELECT * BULK COLLECT INTO TEMP_T1T2_V_ROW_TAB
    FROM TEMP_T1T2_V VW
    WHERE ((VW.OBJECT_ID) IN (SELECT OBJ_ID
    FROM TABLE(CAST(TEMP_OBJ_TAB AS TEMP_OBJ_TAB_TYPE))));
    FOR I IN TEMP_OBJ_TAB.FIRST..TEMP_OBJ_TAB.LAST
    LOOP
    DBMS_OUTPUT.PUT_LINE('OBJ_ID = '||TEMP_OBJ_TAB(I).OBJ_ID);
    END LOOP;
    DBMS_OUTPUT.PUT_LINE('---------------------');
    IF TEMP_T1T2_V_ROW_TAB.COUNT > 0 THEN
    FOR I IN TEMP_T1T2_V_ROW_TAB.FIRST..TEMP_T1T2_V_ROW_TAB.LAST
    LOOP
    DBMS_OUTPUT.PUT_LINE(TEMP_T1T2_V_ROW_TAB(I).OBJECT_ID||' : '||TEMP_T1T2_V_ROW_TAB(I).OBJECT_NAME);
    END LOOP;
    ELSE
    DBMS_OUTPUT.PUT_LINE('NO ROWS RETURNED!');
    END IF;
    DBMS_OUTPUT.PUT_LINE('---------------------');
    END;
    /

    I can reproduce it:
    SQL*Plus: Release 11.2.0.3.0 Production on Tue Oct 30 14:05:39 2012
    Copyright (c) 1982, 2011, Oracle.  All rights reserved.
    Enter user-name: scott
    Enter password:
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> select  *
      2    from  v$version
      3  /
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    PL/SQL Release 11.2.0.3.0 - Production
    CORE    11.2.0.3.0      Production
    TNS for 64-bit Windows: Version 11.2.0.3.0 - Production
    NLSRTL Version 11.2.0.3.0 - Production
    SQL> CREATE TABLE TEMP_T1 AS SELECT * FROM ALL_OBJECTS;
    Table created.
    SQL>
    SQL> CREATE TABLE TEMP_T2 AS SELECT * FROM ALL_OBJECTS;
    Table created.
    SQL>
    SQL> UPDATE TEMP_T2 SET OBJECT_ID = OBJECT_ID * 37;
    72883 rows updated.
    SQL>
    SQL> CREATE UNIQUE INDEX TEMP_T1_U1 ON TEMP_T1(OBJECT_ID);
    Index created.
    SQL>
    SQL> CREATE UNIQUE INDEX TEMP_T2_U1 ON TEMP_T2(OBJECT_ID);
    Index created.
    SQL>
    SQL> CREATE OR REPLACE VIEW TEMP_T1T2_V AS
      2  SELECT * FROM TEMP_T1 UNION ALL SELECT * FROM TEMP_T2;
    View created.
    SQL>
    SQL> CREATE OR REPLACE TYPE TEMP_OBJ_TYPE AS OBJECT (OBJ_ID NUMBER)
      2  /
    Type created.
    SQL> CREATE OR REPLACE TYPE TEMP_OBJ_TAB_TYPE IS TABLE OF TEMP_OBJ_TYPE
      2  /
    Type created.
    SQL> SET SERVEROUTPUT ON;
    SQL>
    SQL> DECLARE
      2  TYPE TEMP_T1T2_V_ROW_TAB_TYPE IS TABLE OF TEMP_T1T2_V%ROWTYPE;
      3  TEMP_T1T2_V_ROW_TAB TEMP_T1T2_V_ROW_TAB_TYPE;
      4  TEMP_OBJ_TAB TEMP_OBJ_TAB_TYPE := TEMP_OBJ_TAB_TYPE();
      5  PROCEDURE ADD_TO_TEMP_OBJ_TAB(OBJ_ID IN NUMBER) IS
      6  BEGIN
      7  TEMP_OBJ_TAB.EXTEND;
      8  TEMP_OBJ_TAB(TEMP_OBJ_TAB.LAST) := TEMP_OBJ_TYPE(OBJ_ID);
      9  END;
    10  BEGIN
    11  ADD_TO_TEMP_OBJ_TAB(100);
    12  ADD_TO_TEMP_OBJ_TAB(116);
    13  ADD_TO_TEMP_OBJ_TAB(279);
    14  ADD_TO_TEMP_OBJ_TAB(364);
    15  DBMS_OUTPUT.PUT_LINE('=====================');
    16  FOR I IN TEMP_OBJ_TAB.FIRST..TEMP_OBJ_TAB.LAST
    17  LOOP
    18  DBMS_OUTPUT.PUT_LINE('OBJ_ID = '||TEMP_OBJ_TAB(I).OBJ_ID);
    19  END LOOP;
    20  DBMS_OUTPUT.PUT_LINE('---------------------');
    21  SELECT * BULK COLLECT INTO TEMP_T1T2_V_ROW_TAB
    22  FROM TEMP_T1T2_V VW
    23  WHERE ((VW.OBJECT_ID) IN (SELECT OBJ_ID
    24  FROM TABLE(CAST(TEMP_OBJ_TAB AS TEMP_OBJ_TAB_TYPE))));
    25  FOR I IN TEMP_OBJ_TAB.FIRST..TEMP_OBJ_TAB.LAST
    26  LOOP
    27  DBMS_OUTPUT.PUT_LINE('OBJ_ID = '||TEMP_OBJ_TAB(I).OBJ_ID);
    28  END LOOP;
    29  DBMS_OUTPUT.PUT_LINE('---------------------');
    30  IF TEMP_T1T2_V_ROW_TAB.COUNT > 0 THEN
    31  FOR I IN TEMP_T1T2_V_ROW_TAB.FIRST..TEMP_T1T2_V_ROW_TAB.LAST
    32  LOOP
    33  DBMS_OUTPUT.PUT_LINE(TEMP_T1T2_V_ROW_TAB(I).OBJECT_ID||' : '||TEMP_T1T2_V_ROW_TAB(I).OBJECT_NAME);
    34  END LOOP;
    35  ELSE
    36  DBMS_OUTPUT.PUT_LINE('NO ROWS RETURNED!');
    37  END IF;
    38  DBMS_OUTPUT.PUT_LINE('---------------------');
    39  END;
    40  /
    =====================
    OBJ_ID = 100
    OBJ_ID = 116
    OBJ_ID = 279
    OBJ_ID = 364
    OBJ_ID = 100
    OBJ_ID = 116
    OBJ_ID = 279
    OBJ_ID = 364
    364 : I_AUDIT
    364 : I_AUDIT
    364 : I_AUDIT
    364 : I_AUDIT
    PL/SQL procedure successfully completed.
    SQL> column object_name format a30
    SQL> select  object_id,
      2          object_name
      3    from  dba_objects
      4    where object_id in (100,116,279,364)
      5  /
    OBJECT_ID OBJECT_NAME
           100 ORA$BASE
           116 DUAL
           279 MAP_OBJECT
           364 I_AUDIT
    SQL>  Works fine in:
    =====================
    OBJ_ID = 100
    OBJ_ID = 116
    OBJ_ID = 279
    OBJ_ID = 364
    OBJ_ID = 100
    OBJ_ID = 116
    OBJ_ID = 279
    OBJ_ID = 364
    100 : ORA$BASE
    116 : DUAL
    364 : SYSTEM_PRIVILEGE_MAP
    279 : MAP_OBJECT
    PL/SQL procedure successfully completed.
    SQL> select  object_id,
      2          object_name
      3    from  dba_objects
      4    where object_id in (100,116,279,364)
      5  /
    OBJECT_ID OBJECT_NAME
          100 ORA$BASE
          116 DUAL
          364 SYSTEM_PRIVILEGE_MAP
          279 MAP_OBJECT
    SQL> select  *
      2    from  v$version
      3  /
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE    11.2.0.1.0      Production
    TNS for 32-bit Windows: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    SQL>SY.
    Edited by: Solomon Yakobson on Oct 30, 2012 2:14 PM

  • Performance Issue in UNION ALL....

    Hi,
    I have a performance issue in a query using select.. union all .
    There are few select statements which are joined by union all.
    I need to re-frame the query such that the records from each individual select
    statement can be appended into a collection variable.
    I need to avoid the use of UNION ALL.
    Can anyone please help me out in this issue?
    Please find the select statement below.
    SELECT *
    FROM v_gfd1_asset_allocation
    WHERE NVL(value,0) <> 0
    AND scheme = p_scheme_id
    UNION ALL
    SELECT *
    FROM v_gfd1_capitalization_alloc
    WHERE NVL(value,0) <> 0
    AND scheme = p_scheme_id
    UNION ALL
    SELECT *
    FROM v_gfd1_currency_allocation
    WHERE NVL(value,0) <> 0
    AND scheme = p_scheme_id
    Thanks,
    Santhosh

    The UNION ALL takes the result set of one query, appends the result set of the next, and so forth. No sorting or filtering takes place. So, as each query has to be executed to completion, I do not think there is another way - that is what union all is for.
    You would probably do well to examine each query's access path. Would an index on NVL( value, 0 ), scheme help, for instance? Understanding the data distribution in the table and how it affects the execution plan would help you improve query performance.

  • Union & Union All

    Hi Everyone,
    I have a scenario like this
    3 source tables need to be populated in one target table. The same scenario can be achieved in Oracle Warehouse Builder(OWB) by using set operator, where we have different options like Union,Unionall..
    How can i achieve the same scenario in ODI.
    Any one please help me on this.
    Regards
    Thiyag

    Hi Thiyag,
    Never mind. I am not that much in to points and all, the thing is i want to make sure, i am not wasting my time here ( seeking for reorganization is a basic human intention right? ). ;)
    Well here you go,
    Union:
    If you have 3 source table create 3 interface ( put that in a package) with same target.
    1 and 2 nd Interface : select IKM SQL Control Append and check the DISTINCT options.
    3 rd Interface : Select IKM Incremental Update and make UPDATE option to NO, check DISTINCT option too.
    Union All:
    1 ,2 nd and 3rd Interface : select IKM SQL Control Append and check the DISTINCT options.
    Makes sense?
    Thanks,
    G

  • Will my apps be affected when I update my iPod?

    Will the saved content on my apps be affected when I update my iPod? I think when you update your iPod, it deletes all your app content. But if I use backup and restore my apps, will the saved content on my apps come back??

    Yes, I know it deletes everything. I just want to know that will it delete my saved data on my apps.
    Like, say I was playing Temple Run. I have saved data on that game (stats, scores, achievements, unlocks, etc). After I update my iPod and then back up the app, will I still haved that saved data (stats, scores, etc)?

  • "songs..can't be updated b/c all the playlists for updating no longer exist

    My Ipod was "off power" for so long that it "forgot" all its music. Now when I plug it in to my base computer, rather then synching it says "songs on the ipod "name" cannot be updated because all the playlists for updating no longer exist"

    Hey.
    See if this can help;
    http://discussions.apple.com/thread.jspa?threadID=121728&tstart=150
    Cheers!
    -Bryan

  • OAF Export button fetching data in one column - view object using union all

    Dear All,
    Export button showing data in one column from  view object,
    View object is based on mulitple queries with union all ,
    Please let me know the solution for this issue.
    Thanks
    Maheswara Raju

    Maheswara Raju,
    As per my understanding you are not able to export all the View Attribute using export Button. Only the attribute which is used with the item/region will get exported.
    There are few work around in case if you want to export the column without showing on OAF Page. Let me know.
    Cheers
    Gyan

  • Microsoft all ready has an update for Windows Phone 8.1 Verizon customers still don't have WP 8.1. UGH!

    Microsoft has all ready released an update to Windows Phone 8.1. Us Verizon customers don't even have WP 8.1. *** Verizon?  My contract with Verizon is up in November this is the tipping point.  I am not going to renew my contract.  I will just buy the phone out right and sign up for Straight Talk.  Then I don't need to have the "Nanny service provider (Verizon)" telling me when I am able to obtain a device update.  Thanks for nothing Verizon.

    On one side, I can understand that maybe (and that's a BIG maybe) Verizon wants to make sure they have enough data (pardon the pun) regarding the successful adaptation of the update for it's customers in order to make sure everything goes smoothly.  However, I find that Verizon likes to keep customers in the dark regarding time frames.  It's interesting to see on some of the similar titles message boards entries on this topic have Verizon monitors ready to wipe out entries if they violate terms of service on the forums.  But, when asked directly about time frames for Windows updates, you either get a link to some Verizon news page (which is of no help), or nothing at all.  A number of people called Verizon customer service and get varied answers like: "Sometime this summer", "Soon", or even an "I don't know, they don't even tell us either"...which is the answer I got one time.  Very discouraging.  I had a choice between the Windows Phone, or a Samsung Galaxy phone.  I chose Windows because of it's features.  Beginning to regret it now, since support for it on Verizon appears to be dismal at best.   

  • Hi all! I was updating the software on i pad to ios6, update was interrupted(apple update server is unavailable...). iTunes Diagnostics shows that "secure link to I tunes store failed". I use Windows 7 Home Premium 64 bit. Can anybody help please?

    Hi all! I was updating the software on i pad to ios6, update was interrupted(apple update server is unavailable...). iTunes Diagnostics shows that "secure link to I tunes store failed". I use Windows 7 Home Premium 64 bit. Can anybody help please?
    The following was done so far:
    1. Windows Firewall - new rule created for itunes.
    2. iTunes - latest version installed.
    3. LAN setting : automatic detection of proxy is enabled;
    4. iTunes diagnostics shows:
    Microsoft Windows 7 x64 Home Premium Edition (Build 7600)
    TOSHIBA Satellite L655
    iTunes 11.0.2.26
    QuickTime 7.7.3
    FairPlay 2.3.31
    Apple Application Support 2.3.3
    iPod Updater Library 10.0d2
    CD Driver 2.2.3.0
    CD Driver DLL 2.1.3.1
    Apple Mobile Device 6.1.0.13
    Apple Mobile Device Driver 1.64.0.0
    Bonjour 3.0.0.10 (333.10)
    Gracenote SDK 1.9.6.502
    Gracenote MusicID 1.9.6.115
    Gracenote Submit 1.9.6.143
    Gracenote DSP 1.9.6.45
    iTunes Serial Number 003FB880034B7720
    Current user is not an administrator.
    The current local date and time is 2013-04-23 11:01:14.
    iTunes is not running in safe mode.
    WebKit accelerated compositing is enabled.
    HDCP is supported.
    Core Media is supported.
    Video Display Information
    Intel Corporation, Intel(R) HD Graphics
    **** External Plug-ins Information ****
    No external plug-ins installed.
    iPodService 11.0.2.26 (x64) is currently running.
    iTunesHelper 11.0.2.26 is currently running.
    Apple Mobile Device service 3.3.0.0 is currently running.
    **** Network Connectivity Tests ****
    Network Adapter Information
    Adapter Name:          {1CB5BBC2-8124-4664-899A-CE0A4683E3B4}
    Description:          Realtek RTL8188CE Wireless LAN 802.11n PCI-E NIC
    IP Address:          0.0.0.0
    Subnet Mask:          0.0.0.0
    Default Gateway:          0.0.0.0
    DHCP Enabled:          Yes
    DHCP Server:
    Lease Obtained:          Thu Jan 01 08:00:00 1970
    Lease Expires:          Thu Jan 01 08:00:00 1970
    DNS Servers:
    Adapter Name:          {8140112A-43D0-41D6-8B36-BE146C811173}
    Description:          Atheros AR8152/8158 PCI-E Fast Ethernet Controller (NDIS 6.20)
    IP Address:          10.5.7.196
    Subnet Mask:          255.255.0.0
    Default Gateway:          10.5.0.1
    DHCP Enabled:          Yes
    DHCP Server:          172.18.255.2
    Lease Obtained:          Tue Apr 23 10:14:40 2013
    Lease Expires:          Tue Apr 23 22:14:40 2013
    DNS Servers:          121.97.59.7
                        121.97.59.2
                        121.97.59.3
    Active Connection:          LAN Connection
    Connected:          Yes
    Online:                    Yes
    Using Modem:          No
    Using LAN:          Yes
    Using Proxy:          No
    Firewall Information
    Windows Firewall is on.
    iTunes is NOT enabled in Windows Firewall.
    Connection attempt to Apple web site was successful.
    Connection attempt to browsing iTunes Store was unsuccessful.
    The network connection timed out.
    Connection attempt to purchasing from iTunes Store was successful.
    Connection attempt to iPhone activation server was successful.
    Connection attempt to firmware update server was unsuccessful.
    The network connection timed out.
    Connection attempt to Gracenote server was successful.
    The network connection timed out.
    Last successful iTunes Store access was 2013-03-22 10:05:31.
    @@@. iTunes IS ENABLED THROUGH THE FIREWALL , even though diagnostics says "NOT enabled"

    hours after the first post i somehow got this to work. dont know how, but i do tried the dns clear cache, the clear host file, oh and i did the check automatically detech dns AND THEN se-check it again before i got this to work.

  • My gen 3 iPod Touch seems to have duplicated all my music since updating to IOS 5 so that it now only holds half as much. What can I do about it? I'm using the same iTunes library with OS 10.6 and all software up to date.

    My gen 3 iPod Touch seems to have duplicated all my music since updating to IOS 5 so that it now only holds half as much. What can I do about it? I'm using the same iTunes library with OS 10.6 and all software up to date.

    Is the camera damaged? Could be a hardware problem.
    Try:
    Close the Camera app in the multitasking bar, then try again.
    Restart/Reset/Restore your iPod. In that order.

  • Error while executing UNION ALL query

    Hello everyone,
    I'm executing the below query on Oracle 9.2.0.8 version.
    select hdr.*
    from ttl_hdr hdr, ttl_service ser
    where hdr.cus_nbr = ser.cus_nbr
    and hdr.dn in ('1232','2342',343','343')
    union all
    select hdr.*
    from ttl_hdr_his hdr, ttl_service ser
    where hdr.cus_nbr = ser.cus_nbr
    and hdr.dn in ('1232','2342',343','343')
    and I encounter following error:
    ORA-01790: expression must have same datatype as corresponding expression
    But instead of * if I'm specifying a list of few columns, it executes the query properly.
    Can anybody tell me what the problem is ?
    regards,
    Rossy

    Hi,
    All columns in your tables TTL_HDR and TTL_HDR_HIS are not with same data type.
    I'm sure you get same error if you specify all columns that * brings.
    Specify column names and use conversion function to get data type same to column from both selects.
    PS: and I think this is not Application Express related
    Br, Jari

  • Apps won't load after all the apps got updated, why?

    Hi all,
    I have recently updated most of my apps on my ipod touch (2nd gen) and realized none of the apps would work, I was wondering what the problem might be?
    I went to an apple store and showed it to one of the guy and he said I should just restore my ipod, but that means I will simply restore everything to the factory setting.
    I was thinking if it's because my software version is currently on 2.2.1 and I will need to pay $5.99 AUD for an ipod touch software update to v3.1 software for the apps to work?
    Thanks in advance.
    Waynos

    Welcome to the discussions,
    did you reset the ipod by holding the sleep and home button until the Apple logo comes up again after the app updates?
    Did you check the apps in the store about the system requirements? Some do need 3.0 or above to work correctly. Or see the developers page for more details.

Maybe you are looking for

  • Problems with File I/O

    When my filewriter writes text to a text file, it represents line breaks as a Square character in Notepad. However, the linereader does not recognize these breaks when I'm reading the file into my java program. Is there any way I can avoid this probl

  • TS3274 I just ran the os 5.1.1 update and now my Ipad 3 doesn't work

    I downloaded the new os update today.  I checked agreed on the licensing agreement.  The update began to install.  I had to step away from my desk.  When I came back my ipad was flashing b/w a blank black screen and a screen with the apple logo.  It

  • Z10 Overheats and packs up

    I had an issue over the weekend where my phone would overheat and show a blue screen. I would be on Skype video call and within 5 minutes, the phone would overheat, go from a streaked line to a full blue screen (anyone remember windows blue screen of

  • ADS file encoding

    I have found that you can explicitelly define ADS flat file formatting (meaning unicode or non-unicode). Unfortunatelly, I have lost it. Could anyone help me? I know that it was in header of this file, but I can't remember anything else. :( Because I

  • How to retrieve iPhone tracking information from iPhone.

    Does anyone know how to get the tracking information off of the iPhone?  I am trying to get this information as I am fighting a parking ticket I received while my car was valet'd, but have no other record of being at the bar on the night in question