One Query need to tune

I have one query below to tune.
Here one table USER_RETAILER_MAP and its column BELONGS_TO having value only 'Y' and 'N'.
Created bitmap index but i am not getting any cost difference.
Please share your idea ,how to tune and what process should follow.
SQL> explain plan for
2 SELECT a.user_id,
3 a.user_nm,
4 2 AS max_level
5 FROM gss_user a
6 WHERE a.user_id NOT IN (SELECT user_id
7 FROM user_retailer_map
8 WHERE retailer_id IN (SELECT b.retailer_id
9 FROM user_retailer_map b,
10 retailer c
11 WHERE
12 b.retailer_id = c.retailer_id
13 AND b.user_id = :a
14 AND c.status = 'ACTIVE'
15 AND b.managed_by = 'Y')
16 AND belongs_to = 'Y')
17 AND Upper(a.status) = 'ACTIVE'
18 AND a.user_id IN (SELECT user_id
19 FROM user_hierarchy
20 WHERE parent_user_id = :b)
21 AND a.gmac_dealer_user_flg = 'D'
22 ORDER BY Upper(user_nm) ASC
23 ;
Explained.
SQL> @utlxpls
PLAN_TABLE_OUTPUT
| Id | Operation | Name | Rows | Bytes | Cost |
| 0 | SELECT STATEMENT | | 1 | 91 | 65 |
| 1 | SORT ORDER BY | | 1 | 91 | 65 |
|* 2 | HASH JOIN ANTI | | 1 | 91 | 63 |
| 3 | NESTED LOOPS SEMI | | 7 | 504 | 9 |
|* 4 | TABLE ACCESS FULL | GSS_USER | 33 | 1254 | 9 |
|* 5 | INDEX UNIQUE SCAN | XPKGSS_USER_HIERARCHY | 7 | 238 | |
| 6 | VIEW | VW_NSO_1 | 212 | 4028 | 53 |
|* 7 | HASH JOIN | | 212 | 15476 | 53 |
|* 8 | HASH JOIN | | 15 | 675 | 9 |
| 9 | TABLE ACCESS BY INDEX ROWID| USER_RETAILER_MAP | 15 | 420 | 4 |
|* 10 | INDEX RANGE SCAN | INDX_USERID_MNGBY | 15 | | 1 |
|* 11 | INDEX FAST FULL SCAN | INDX_RETAILE | 1594 | 27098 | 4 |
|* 12 | TABLE ACCESS FULL | USER_RETAILER_MAP | 22885 | 625K| 43 |
Predicate Information (identified by operation id):
2 - access("A"."USER_ID"="VW_NSO_1"."$nso_col_1")
4 - filter(UPPER("A"."STATUS")='ACTIVE' AND "A"."GMAC_DEALER_USER_FLG"='D')
5 - access("A"."USER_ID"="USER_HIERARCHY"."USER_ID" AND "USER_HIERARCHY"."PARENT_USER
_ID"=:Z)
7 - access("USER_RETAILER_MAP"."RETAILER_ID"="B"."RETAILER_ID")
8 - access("B"."RETAILER_ID"="C"."RETAILER_ID")
10 - access("B"."USER_ID"=:Z AND "B"."MANAGED_BY"='Y')
11 - filter("C"."STATUS"='ACTIVE')
12 - filter("USER_RETAILER_MAP"."BELONGS_TO"='Y')
}

How to post a SQL statement tuning request...
HOW TO: Post a SQL statement tuning request - template posting

Similar Messages

  • Query Need to tune

    Dear Experts,
    Is this plan need improvement ?
    SQL> select * from table(dbms_xplan.display_awr('1hc2rwf9u3p45'));
    PLAN_TABLE_OUTPUT                                                              
    SQL_ID 1hc2rwf9u3p45                                                           
    SELECT W.QUEUENAME, COUNT(W.QUEUENAME) AS COUNT FROM table1 W, table2
    I WHERE                                                                       
    (I.CLEARINGDATE=TO_CHAR(SYSDATE,'DD/MM/YYYY') OR I.CLEARINGDATE=TO_CHAR(SYSDATE-
    1,'DD/MM/YYYY') OR                                                             
    I.CLEARINGDATE=TO_CHAR(SYSDATE-2,'DD/MM/YYYY') OR I.CLEARINGDATE=TO_CHAR(SYSDATE
    -3,'DD/MM/YYYY') OR                                                            
    PLAN_TABLE_OUTPUT                                                              
    I.CLEARINGDATE=TO_CHAR(SYSDATE-4,'DD/MM/YYYY') OR I.CLEARINGDATE=TO_CHAR(SYSDATE
    -5,'DD/MM/YYYY')) AND                                                          
    I.INSTANCEID = W.PROCESSINSTANCEID GROUP BY W.QUEUENAME                        
    Plan hash value: 2530106149                                                    
    | Id  | Operation                      | Name                    | Rows  | Bytes
    PLAN_TABLE_OUTPUT                                                              
    |TempSpc| Cost (%CPU)| Time     |                                             
    |   0 | SELECT STATEMENT               |                         |       |     
    |       | 30399 (100)|          |                                             
    |   1 |  SORT GROUP BY                 |                         |    12 |  1488
    |       | 30399   (1)| 00:02:53 |                                             
    PLAN_TABLE_OUTPUT                                                              
    |   2 |   HASH JOIN                    |                         | 66064 |  7999
    K|  3168K| 30393   (1)| 00:02:53 |                                             
    |   3 |    INLIST ITERATOR             |                         |       |     
    |       |            |          |                                             
    |   4 |     TABLE ACCESS BY INDEX ROWID| table2              | 66064 |  2387
    K|       |  5653   (1)| 00:00:33 |                                             
    |   5 |      INDEX RANGE SCAN          | IDX_table3_CLEARINGDATE | 66064 |     
    |       |   175   (2)| 00:00:01 |                                             
    PLAN_TABLE_OUTPUT                                                              
    |   6 |    INDEX FAST FULL SCAN        | I                       |  2291K|   190
    M|       | 13801   (1)| 00:01:19 |                                             
    22 rows selected.Thanks&Regards
    Sunil Kumar

    Hello,
    First you gather statistics on all the database tables.you can also gather statistics on those tables only.Second explain statement will show you the actual cost of this statement.the explain statement will show you the cost and if this query is doing sof or hard parsing.
    Kind regards
    Mohamed
    Oracle DBA

  • Do I need to tune the base query of my materialized view ?

    Hi gurus,
    We implement materialized view (FAST REFRESH ON COMMIT) on base table used in OLTP system. In fact the MV itself is also queried by the OLTP system itself, interactively.
    Currently user complain that after they input transaction, they see that the MV is not refresh as soon as they commit the transaction.
    (it takes 5 to 10 minutes before they see the update on the MV)
    The query of the MV is attached below, it consists of union all of two queries but actually the real query has 13 queries on a UNION ALL.
    The question is :
    Do I need to tune the query that forms the MV ?
    Does it impact the refresh time of the MV ?
    Thank you for your help,
    xtanto
    SELECT GRNH.DOC_CODE ||' '|| GRNH.GRN_NO, GRNH.GRN_DATE, GRNH.REGS_CODE,
    F_Convert_Qty_K(GRND.PRODUCT, GRND.QTY, GRND.UOM) QTY_IN, 0 QTY_OUT, 0 QTY_ADJ, 'N/A'.....
    FROM GRN_LOCAL_D GRND
              JOIN GRN_LOCAL_H GRNH ON GRNH.GRNH_ID = GRND.GRNH_ID
              WHERE GRND.PRODUCT IS NOT NULL AND GRNH.WH_CODE IS NOT NULL
    UNION ALL
    SELECT GRNH.DOC_CODE ||' '|| GRNH.GRN_NO, GRNH.GRN_DATE, GRNH.REGS_CODE,
    F_Convert_Qty_K(GRND.PRODUCT_B, GRND.QTY_B, GRND.UOM_B) QTY_IN, 0 QTY_OUT, 0 QTY_ADJ, 'N/A'...
    FROM GRN_LOCAL_D GRND
    JOIN GRN_LOCAL_H GRNH ON GRNH.GRNH_ID = GRND.GRNH_ID
    WHERE GRND.PRODUCT_B IS NOT NULL AND GRNH.WH_CODE IS NOT NULL
    UNION ALL
         ......

    Hi Justin & APC,
    Are they seeing a 5-10 minute delay in being able to commit their transaction?NO, the commit itself is completed normally, but after that when they go to the page (this is webbased app) that display data from the MV, the newly committed transactionis not there yet. Only after 5-10 minutes we can see the new data.
    What does the F_Convert_Qty_K() function do?It is a function that convert the quantity from whatever Unit Of Measurement (UOM) into the smallest UOM. Below is the code.
    So the question remains:
    why intermittently theere is delay before the new data visible in the MV ?
    Thanks you,
    xtanto
    CREATE OR REPLACE FUNCTION F_Convert_Qty (pProduct VARCHAR2, pQty NUMBER, pUOM VARCHAR2)
    RETURN NUMBER
    IS
    vQtyBase NUMBER(13,5);
    BEGIN
    SELECT CASE WHEN pUOM = ( SELECT UOM_BASE FROM PRODUCTS WHERE PRODUCT = pProduct)
              THEN pQty
         ELSE
                   SELECT ROUND(pQty * Coefficient / Divisor, 5)
                   FROM (
                             SELECT Coefficient, Divisor FROM CONVERT_UOM
                             WHERE PRODUCT = pProduct AND UOM_CONVERT = pUOM
                             ) tmp
              END INTO vQtyBase FROM DUAL;
    --RETURN (vQtyBase) ;
    RETURN ( NVL(vQtyBase,0) ) ;
    END F_Convert_Qty;
    /

  • Need to tune insert query

    Hi,
    I'm using below query inside the procedure.I need to tune this query as it is taking more time for execution.Could you some help on this
    *version.*
    10.2.0
    Query
    INSERT INTO  TEMP_TEST_STAT(
                SELECT S.STUDENT_ID_PK, A.RESPONSE_KEY GENDER, B.RESPONSE_KEY ETHNICITY, T.SCORE SCALE_SCORE ,D.TEST_NAME
                FROM TEST_SESSION_DETAIL T, TEST_SESSION S, STUDENT U, TEST_DETAIL D,
                SELECT I.ITEM_ID, I.UIN, BG.BG_SESSION_DETAIL_ID, BG.RESPONSE_KEY , B.TEST_SESSION_ID, C.STUDENT_ID_PK
                FROM BG_QUESTION_USER_RESPONSE BG, ITEM I, BG_SESSION_DETAIL B, TEST_SESSION C
                WHERE
                BG.ITEM_ID = I.ITEM_ID AND I.UIN = 'SBG002' AND
                BG.BG_SESSION_DETAIL_ID = B.BG_SESSION_DETAIL_ID
                AND B.TEST_SESSION_ID = C.TEST_SESSION_ID ) A,
                SELECT I.ITEM_ID, I.UIN, BG.BG_SESSION_DETAIL_ID, BG.RESPONSE_KEY , B.TEST_SESSION_ID, C.STUDENT_ID_PK
                FROM BG_QUESTION_USER_RESPONSE BG, ITEM I, BG_SESSION_DETAIL B, TEST_SESSION C
                WHERE
                BG.ITEM_ID = I.ITEM_ID AND I.UIN = 'SBG001' AND
                BG.BG_SESSION_DETAIL_ID = B.BG_SESSION_DETAIL_ID
                AND B.TEST_SESSION_ID = C.TEST_SESSION_ID ) B
                ,INSTITUTION E
                WHERE
                D.TEST_NAME = 'Reading Comprehension' AND
                T.TEST_SESSION_STATUS_ID = 3
                AND TRUNC(T.TEST_END_DATE) BETWEEN TO_DATE('01-09-09','DD-MON-YY') AND TO_DATE('30-09-09','DD-MON-YY')
                AND T.TEST_DETAIL_ID = D.TEST_DETAIL_ID
                AND S.STUDENT_ID_PK = U.STUDENT_ID_PK
                AND S.TEST_SESSION_ID = T.TEST_SESSION_ID
                AND A.TEST_SESSION_ID = T.TEST_SESSION_ID
                AND A.STUDENT_ID_PK = S.STUDENT_ID_PK
                AND B.TEST_SESSION_ID = T.TEST_SESSION_ID
                AND B.STUDENT_ID_PK = S.STUDENT_ID_PK
                AND S.INSTITUTION_ID=E.INSTITUTION_ID
                AND SUBSTR(E.INSTITUTION_ID_DISPLAY,8,3) <> '000');
    Explain plan
    PLAN_TABLE_OUTPUT
    Plan hash value: 790379856
    | Id  | Operation                                      | Name                         | Rows  | Bytes | Cost (%CPU)| Time     | Pstart| Pstop |
    |   0 | INSERT STATEMENT                               |                              |     1 |   204 |  1567   (1)| 00:00:19 |       |       |
    |*  1 |  FILTER                                        |                              |       |       |            |          |       |       |
    |   2 |   NESTED LOOPS                                 |                              |     1 |   204 |  1567   (1)| 00:00:19 |       |       |
    |   3 |    NESTED LOOPS                                |                              |     1 |   189 |  1566   (1)| 00:00:19 |       |       |
    |   4 |     NESTED LOOPS                               |                              |     1 |   167 |  1561   (1)| 00:00:19 |       |       |
    |   5 |      NESTED LOOPS                              |                              |     1 |   155 |  1560   (1)| 00:00:19 |       |       |
    |   6 |       NESTED LOOPS                             |                              |     1 |   143 |  1556   (1)| 00:00:19 |       |       |
    |   7 |        NESTED LOOPS                            |                              |     1 |   128 |  1555   (1)| 00:00:19 |       |       |
    |   8 |         NESTED LOOPS                           |                              |     1 |   106 |  1550   (1)| 00:00:19 |       |       |
    |   9 |          NESTED LOOPS                          |                              |   186 | 17484 |  1364   (1)| 00:00:17 |       |       |
    |* 10 |           HASH JOIN                            |                              |    86 |  7052 |  1020   (1)| 00:00:13 |       |       |
    |  11 |            NESTED LOOPS                        |                              |    86 |  5848 |  1002   (1)| 00:00:13 |       |       |
    |* 12 |             HASH JOIN                          |                              |    86 |  4472 |   916   (1)| 00:00:11 |       |       |
    |* 13 |              INDEX RANGE SCAN                  | TEST_DETAIL_AK_1             |     1 |    21 |     2   (0)| 00:00:01 |       |       |
    |* 14 |              TABLE ACCESS BY GLOBAL INDEX ROWID| TEST_SESSION_DETAIL          |  8549 |   258K|   914   (1)| 00:00:11 | ROWID | ROWID |
    |* 15 |               INDEX RANGE SCAN                 | TEST_END_DATE_IDX            | 15672 |       |    53   (0)| 00:00:01 |       |       |
    |  16 |             PARTITION HASH ITERATOR            |                              |     1 |    16 |     1   (0)| 00:00:01 |   KEY |   KEY |
    |  17 |              TABLE ACCESS BY LOCAL INDEX ROWID | TEST_SESSION                 |     1 |    16 |     1   (0)| 00:00:01 |   KEY |   KEY |
    |* 18 |               INDEX UNIQUE SCAN                | PK_TEST_SESSION              |     1 |       |     0   (0)| 00:00:01 |   KEY |   KEY |
    |* 19 |            INDEX FAST FULL SCAN                | INSTI_ID_NAME_COUN_DISP_IDX  |  5930 | 83020 |    17   (0)| 00:00:01 |       |       |
    |  20 |           TABLE ACCESS BY GLOBAL INDEX ROWID   | BG_SESSION_DETAIL            |     2 |    24 |     4   (0)| 00:00:01 | ROWID | ROWID |
    |* 21 |            INDEX RANGE SCAN                    | BG_SESS_DETAIL_TEST_SE_FK1_I |     2 |       |     2   (0)| 00:00:01 |       |       |
    |  22 |          PARTITION HASH ITERATOR               |                              |     1 |    12 |     1   (0)| 00:00:01 |   KEY |   KEY |
    |* 23 |           TABLE ACCESS BY LOCAL INDEX ROWID    | TEST_SESSION                 |     1 |    12 |     1   (0)| 00:00:01 |   KEY |   KEY |
    |* 24 |            INDEX UNIQUE SCAN                   | PK_TEST_SESSION              |     1 |       |     0   (0)| 00:00:01 |   KEY |   KEY |
    |  25 |         TABLE ACCESS BY GLOBAL INDEX ROWID     | BG_QUESTION_USER_RESPONSE    |     4 |    88 |     5   (0)| 00:00:01 | ROWID | ROWID |
    |* 26 |          INDEX RANGE SCAN                      | BG_QUESTION_USER_RESP_IDX1   |     4 |       |     2   (0)| 00:00:01 |       |       |
    |  27 |        PARTITION HASH ITERATOR                 |                              |     1 |    15 |     1   (0)| 00:00:01 |   KEY |   KEY |
    |* 28 |         TABLE ACCESS BY LOCAL INDEX ROWID      | ITEM                         |     1 |    15 |     1   (0)| 00:00:01 |   KEY |   KEY |
    |* 29 |          INDEX UNIQUE SCAN                     | PK_ITEM                      |     1 |       |     0   (0)| 00:00:01 |   KEY |   KEY |
    |  30 |       TABLE ACCESS BY GLOBAL INDEX ROWID       | BG_SESSION_DETAIL            |     2 |    24 |     4   (0)| 00:00:01 | ROWID | ROWID |
    |* 31 |        INDEX RANGE SCAN                        | BG_SESS_DETAIL_TEST_SE_FK1_I |     2 |       |     2   (0)| 00:00:01 |       |       |
    |  32 |      PARTITION HASH ITERATOR                   |                              |     1 |    12 |     1   (0)| 00:00:01 |   KEY |   KEY |
    |* 33 |       TABLE ACCESS BY LOCAL INDEX ROWID        | TEST_SESSION                 |     1 |    12 |     1   (0)| 00:00:01 |   KEY |   KEY |
    |* 34 |        INDEX UNIQUE SCAN                       | PK_TEST_SESSION              |     1 |       |     0   (0)| 00:00:01 |   KEY |   KEY |
    |  35 |     TABLE ACCESS BY GLOBAL INDEX ROWID         | BG_QUESTION_USER_RESPONSE    |     4 |    88 |     5   (0)| 00:00:01 | ROWID | ROWID |
    |* 36 |      INDEX RANGE SCAN                          | BG_QUESTION_USER_RESP_IDX1   |     4 |       |     2   (0)| 00:00:01 |       |       |
    |  37 |    PARTITION HASH ITERATOR                     |                              |     1 |    15 |     1   (0)| 00:00:01 |   KEY |   KEY |
    |* 38 |     TABLE ACCESS BY LOCAL INDEX ROWID          | ITEM                         |     1 |    15 |     1   (0)| 00:00:01 |   KEY |   KEY |
    |* 39 |      INDEX UNIQUE SCAN                         | PK_ITEM                      |     1 |       |     0   (0)| 00:00:01 |   KEY |   KEY |
    Predicate Information (identified by operation id):
       1 - filter(TO_DATE('01-09-09','DD-MON-YY')<=TO_DATE('30-09-09','DD-MON-YY'))
      10 - access("S"."INSTITUTION_ID"="E"."INSTITUTION_ID")
      12 - access("T"."TEST_DETAIL_ID"="D"."TEST_DETAIL_ID")
      13 - access("D"."TEST_NAME"='Reading Comprehension')
      14 - filter("T"."TEST_SESSION_STATUS_ID"=3)
      15 - access(TRUNC(INTERNAL_FUNCTION("TEST_END_DATE"))>=TO_DATE('01-09-09','DD-MON-YY') AND
                  TRUNC(INTERNAL_FUNCTION("TEST_END_DATE"))<=TO_DATE('30-09-09','DD-MON-YY'))
      18 - access("S"."TEST_SESSION_ID"="T"."TEST_SESSION_ID")
      19 - filter(SUBSTR("E"."INSTITUTION_ID_DISPLAY",8,3)<>'000')
      21 - access("B"."TEST_SESSION_ID"="T"."TEST_SESSION_ID")
      23 - filter("C"."STUDENT_ID_PK"="S"."STUDENT_ID_PK")
      24 - access("B"."TEST_SESSION_ID"="C"."TEST_SESSION_ID")
      26 - access("BG"."BG_SESSION_DETAIL_ID"="B"."BG_SESSION_DETAIL_ID")
      28 - filter("I"."UIN"='SBG001')
      29 - access("BG"."ITEM_ID"="I"."ITEM_ID")
      31 - access("B"."TEST_SESSION_ID"="T"."TEST_SESSION_ID")
      33 - filter("C"."STUDENT_ID_PK"="S"."STUDENT_ID_PK")
      34 - access("B"."TEST_SESSION_ID"="C"."TEST_SESSION_ID")
      36 - access("BG"."BG_SESSION_DETAIL_ID"="B"."BG_SESSION_DETAIL_ID")
      38 - filter("I"."UIN"='SBG002')
      39 - access("BG"."ITEM_ID"="I"."ITEM_ID")

    Rob,
    How i can my insert statement here.
    I tried like..but error.
    select /*+ gather_plan_statistics */  INSERT INTO  TEMP_TEST_STAT(
                SELECT S.STUDENT_ID_PK, A.RESPONSE_KEY GENDER, B.RESPONSE_KEY ETHNICITY, T.SCORE SCALE_SCORE ,D.TEST_NAME
                FROM TEST_SESSION_DETAIL T, TEST_SESSION S, STUDENT U, TEST_DETAIL D,
                SELECT I.ITEM_ID, I.UIN, BG.BG_SESSION_DETAIL_ID, BG.RESPONSE_KEY , B.TEST_SESSION_ID, C.STUDENT_ID_PK
                FROM BG_QUESTION_USER_RESPONSE BG, ITEM I, BG_SESSION_DETAIL B, TEST_SESSION C
                WHERE
                BG.ITEM_ID = I.ITEM_ID AND I.UIN = 'SBG002' AND
                BG.BG_SESSION_DETAIL_ID = B.BG_SESSION_DETAIL_ID
                AND B.TEST_SESSION_ID = C.TEST_SESSION_ID ) A,
                SELECT I.ITEM_ID, I.UIN, BG.BG_SESSION_DETAIL_ID, BG.RESPONSE_KEY , B.TEST_SESSION_ID, C.STUDENT_ID_PK
                FROM BG_QUESTION_USER_RESPONSE BG, ITEM I, BG_SESSION_DETAIL B, TEST_SESSION C
                WHERE
                BG.ITEM_ID = I.ITEM_ID AND I.UIN = 'SBG001' AND
                BG.BG_SESSION_DETAIL_ID = B.BG_SESSION_DETAIL_ID
                AND B.TEST_SESSION_ID = C.TEST_SESSION_ID ) B
                ,INSTITUTION E
                WHERE
                D.TEST_NAME = 'Reading Comprehension' AND
                T.TEST_SESSION_STATUS_ID = 3
                AND TRUNC(T.TEST_END_DATE) BETWEEN TO_DATE('01-09-09','DD-MON-YY') AND TO_DATE('30-09-09','DD-MON-YY')
                AND T.TEST_DETAIL_ID = D.TEST_DETAIL_ID
                AND S.STUDENT_ID_PK = U.STUDENT_ID_PK
                AND S.TEST_SESSION_ID = T.TEST_SESSION_ID
                AND A.TEST_SESSION_ID = T.TEST_SESSION_ID
                AND A.STUDENT_ID_PK = S.STUDENT_ID_PK
                AND B.TEST_SESSION_ID = T.TEST_SESSION_ID
                AND B.STUDENT_ID_PK = S.STUDENT_ID_PK
                AND S.INSTITUTION_ID=E.INSTITUTION_ID
                AND SUBSTR(E.INSTITUTION_ID_DISPLAY,8,3)  '000') from dual;please advice

  • I need to print one query result as a single row

    Hi,
    I need to print one query result as a single row ,which gives more than one value (of subinventories)and also i would like to print the quantity of that particular subinventory at particular place.Please suggest how can i do this in the report builder?

    Actually I need to print inventory report with subinventory break up.For that all subinventories of category code AB are taken as single row.Based on that subinventory value Quantity must be printed at that particular place.
    For ex
    Quantity
    Item no Description Subinventory Code AB_Abc AB_Def AB_ghi
    1 ***** 12 9
    2 ****** 8 5
    like that.I am waiting for the reply.Plz its some how urgent.
    Thank you,

  • Need to re write as a one query

    Hi,
    I have a below two queries and i need re write as same query.I'm passing test session id's to second query as of now.In second query i have minimum 5 recods for 1 test session id.finally I'm converting rows as a column from second query based on roster_domain_name column(see the finally o/p).could you some on help.advance thanks.
    1st query
    SELECT DISTINCT a.test_session_id test_session_id, address,
                    TO_CHAR (birth_date, 'yyyy-MM-dd') AS birth_date,
                    branching_profile_name, city, email, exnum, first_name,
                    home_phone, institution_id_display, last_name, middle_name,
                    site_id_display, state_name, student_id,
                    TO_CHAR (test_session_date,
                             'yyyy-MM-dd') AS test_session_date, zip
               FROM vuestudenttestsessioninfo a, test_session_detail b
              WHERE EXISTS (
                       SELECT td.test_detail_id
                         FROM test_detail td
                        WHERE domain_map_id IS NOT NULL
                          AND b.test_detail_id = td.test_detail_id
                          AND domain_map_id IN (27604,27605,27606,27607))
                AND site_id IN ('8904')
               AND TRUNC (test_session_date) BETWEEN TO_DATE ('11/24/2009',
                                                               'MM/DD/YYYY'
                                                  AND TO_DATE ('12/4/2009',
                                                               'MM/DD/YYYY'
                AND a.test_session_status_id IN (3, 4)
                AND a.test_session_id = b.test_session_id
           ORDER BY address1st query o/p like below
    TEST_SESSION_ID     ADDRESS     BIRTH_DATE     BRANCHING_PROFILE_NAME     CITY     EMAIL     EXNUM     FIRST_NAME     HOME_PHONE     INSTITUTION_ID_DISPLAY     LAST_NAME     MIDDLE_NAME     SITE_ID_DISPLAY     STATE_NAME     STUDENT_ID     TEST_SESSION_DATE     ZIP
    SELECT a.test_session_id,c.roster_domain_name,to_char(a.score),a.sem FROM
          test_session_detail a,test_session b ,test_detail c
          WHERE a.test_session_id = b.test_session_id
          AND c.test_detail_id = a.test_detail_id
          AND exists (
          select td.test_detail_id
          from test_detail td
          where domain_map_id is not  null
          and c.test_detail_id =td.test_detail_id
          and domain_map_id in('303','306','305','304'))
          AND b.test_session_id in (getting session ids from 1st query)
          AND domain_group_id NOT IN (
          SELECT domain_group_id
          FROM test_session_detail a,test_session b
          WHERE a.test_session_id = b.test_session_id
          AND a.domain_group_id is not null
          AND b.test_session_status_id = 4
          AND a.test_session_status_id <> 3
          AND b.test_session_id IN (getting session ids from 1st query))
    2nd query o/p
    TEST_SESSION_ID     ROSTER_DOMAIN_NAME     TO_CHAR(A.SCORE)     SEM
    final o/p
    Address     Birth Date     Branching Profile     City     Email     Exnum     First Name     Home Phone     Inst ID     Last Name     Middle Initial     Site ID     State/ Province     Student ID     Test Date     Zip Code     AR - Integers and Fractions     AR - Decimal Numbers     AR - Percent     AR - Estim, Ordering, Numb. Sense     AR - Word Problems

    Hi ,
    Version *10.1.0.2.0*
    Business rule is:
    I have two scenarios 1) can use first query getting result
    2) can use both queries getting result.
    In second scenario i'm facing problem with regarding taking more time due to executing two queries one after one.
    because i'm getting test session id's from first query executing and displaying results from both quires .Now i have thought to merge both queries as a one query.I think it's possible with in line view quires(2nd query).Pls help
    And DDL part i'm using 1 view and reaming tables.here those scripts.
    VIEW vuestudenttestsessioninfo
    Name                                      Null?    Type                       
    STUDENT_ID                                NOT NULL VARCHAR2(50)               
    FIRST_NAME                                NOT NULL VARCHAR2(50)               
    MIDDLE_NAME                                        VARCHAR2(50)               
    LAST_NAME                                 NOT NULL VARCHAR2(50)               
    ADDRESS                                            VARCHAR2(201)              
    CITY                                               VARCHAR2(30)               
    STATE_PROVINCE_COUNTRY                             VARCHAR2(30)               
    ZIP                                                VARCHAR2(20)               
    EMAIL                                              VARCHAR2(100)              
    HOME_PHONE                                         VARCHAR2(20)               
    CELL_PHONE                                         VARCHAR2(20)               
    BIRTH_DATE                                         DATE                       
    STUDENT_ID_PK                             NOT NULL NUMBER                     
    EXNUM                                     NOT NULL NUMBER(9,)                 
    TEST_SESSION_DATE                                  DATE                       
    COMPLETION_DATE                                    DATE                       
    TEST_SESSION_ID                           NOT NULL NUMBER(9,)                 
    INSTITUTION_ID                            NOT NULL NUMBER                     
    SITE_ID                                   NOT NULL NUMBER                     
    BRANCHING_PROFILE_ID                      NOT NULL NUMBER(10,)                
    TEST_SESSION_STATUS_ID                    NOT NULL NUMBER(10,)                
    INSTITUTION_ID_DISPLAY                             VARCHAR2(10)               
    SITE_ID_DISPLAY                                    VARCHAR2(10)               
    STATE_NAME                                         VARCHAR2(30)               
    BRANCHING_PROFILE_NAME                             VARCHAR2(100)              
    SITE_NAME                                 NOT NULL VARCHAR2(200)              
    ADDRESS_2                                          VARCHAR2(100)              
    ADDRESS_1                                          VARCHAR2(100)
    SQL> desc test_session  
    Name                                      Null?    Type
    TEST_SESSION_ID                           NOT NULL NUMBER(9)
    INSTITUTION_ID                            NOT NULL NUMBER
    STUDENT_ID_PK                             NOT NULL NUMBER(9)
    BRANCHING_PROFILE_ID                      NOT NULL NUMBER(10)
    TEST_SESSION_STATUS_ID                    NOT NULL NUMBER(10)
    TEST_SESSION_DATE                                  DATE
    ACCESSED_TIMES                                     NUMBER(9)
    COMPLETION_DATE                                    DATE
    DURATION                                           NUMBER(10)
    CREATED_ON                                         DATE
    MODIFIED_ON                                        DATE
    CREATED_BY                                         NUMBER
    MODIFIED_BY                                        NUMBER
    IS_RESUMED                                         CHAR(1)
    SQL> desc test_session_detail
    Name                                      Null?    Type
    TEST_SESSION_DETAIL_ID                    NOT NULL NUMBER(9)
    TEST_SESSION_ID                           NOT NULL NUMBER(9)
    TEST_DETAIL_ID                            NOT NULL NUMBER(10)
    TEST_SESSION_STATUS_ID                             NUMBER
    THETA                                              NUMBER
    SCORE                                              NUMBER
    PERCENTILE                                         NUMBER
    SEM                                                NUMBER
    TEST_START_DATE                                    DATE
    TEST_END_DATE                                      DATE
    TEST_DURATION                                      NUMBER
    CREATED_ON                                         DATE
    MODIFIED_ON                                        DATE
    CREATED_BY                                         NUMBER
    MODIFIED_BY                                        NUMBER
    TEST_SEED                                          VARCHAR2(15)
    TEST_ALIAS                                         VARCHAR2(30)
    COMPANION_FORM                                     CHAR(1)
    DURATION_START_DATE                                TIMESTAMP(6)
    DURATION_END_DATE                                  TIMESTAMP(6)
    DOMAIN_GROUP_ID                                    NUMBER
    TIMER_LIMIT                                        VARCHAR2(100)
    SQL> desc test_detail
    Name                                      Null?    Type
    TEST_DETAIL_ID                            NOT NULL NUMBER(10)
    TEST_TYPE_ID                              NOT NULL NUMBER(10)
    OPERATIONAL_POOL_ID                                NUMBER(10)
    FIELD_TEST_POOL_ID                                 NUMBER(10)
    INSTITUTION_ID                            NOT NULL NUMBER
    TEST_NAME                                 NOT NULL VARCHAR2(500)
    TEST_ALIAS                                         VARCHAR2(30)
    DESCRIPTION                                        VARCHAR2(100)
    OPERATIONAL_TEST_LENGTH                            NUMBER
    ACTIVE_STATUS                                      CHAR(1)
    DELETE_STATUS                                      CHAR(1)
    FIELD_TEST_ITEM                                    VARCHAR2(1)
    FIELD_TEST_LENGTH                                  NUMBER
    IS_DIR_SAMPLE                                      CHAR(1)
    DIR_SAMPLE_PATH                                    VARCHAR2(1000)
    CREATED_ON                                         DATE
    MODIFIED_ON                                        DATE
    CREATED_BY                                         NUMBER
    MODIFIED_BY                                        NUMBER
    FORM_NAME                                          VARCHAR2(10)
    DOMAIN_MAP_ID                                      NUMBER(9)
    DOMAIN_SEQUENCE                                    NUMBER(9)
    ROSTER_DOMAIN_NAME                                 VARCHAR2(100)

  • Need help reinstalling Acrobat X pro for MAC. Got one site but I-tunes didn't recognize so couldn't go further. I have serial

    Need help reinstalling Acrobat X pro for MAC. Got one site but I-tunes didn't recognize so couldn't go further. I have serial

    Actually, you can and have downloaded from there, because that message only happens when the download is finished.
    The message is entirely normal, and is Apple's way of encouraging the world to use the Mac App Store. That doesn't help you because Acrobat isn't in the Mac App Store - it isn't allowed there.
    So, what to do? Change your system settings
    Please follow the steps given below to resolve this issue -
    System Preferences > Security & Privacy > General > Allow applications downloaded from > Anywhere

  • Do i need to tune the redolog?

    10g R2 on AIX 5.3L
    this is a typical alert file about the redo log file switching of the day.
    Mon May 28 01:26:33 2007
    Thread 1 advanced to log sequence 24017
    Current log# 4 seq# 24017 mem# 0: /u020/apps/oracle/oradata/BAAN/redo04.log
    Mon May 28 08:04:13 2007
    Thread 1 advanced to log sequence 24018
    Current log# 5 seq# 24018 mem# 0: /u020/apps/oracle/oradata/BAAN/redo05.log
    Mon May 28 08:05:56 2007
    Thread 1 advanced to log sequence 24019
    Current log# 3 seq# 24019 mem# 0: /u020/apps/oracle/oradata/BAAN/redo03.log
    Mon May 28 08:07:29 2007
    Thread 1 advanced to log sequence 24020
    Current log# 2 seq# 24020 mem# 0: /u020/apps/oracle/oradata/BAAN/redo02.log
    Mon May 28 08:08:55 2007
    Thread 1 advanced to log sequence 24021
    Current log# 1 seq# 24021 mem# 0: /u020/apps/oracle/oradata/BAAN/redo01.log
    Mon May 28[b] 08:10:26 2007
    Thread 1 advanced to log sequence 24022
    Current log# 4 seq# 24022 mem# 0: /u020/apps/oracle/oradata/BAAN/redo04.log
    Mon May 28 08:12:05 2007
    Thread 1 advanced to log sequence 24023
    Current log# 5 seq# 24023 mem# 0: /u020/apps/oracle/oradata/BAAN/redo05.log
    Mon May 28 08:13:55 2007
    Thread 1 advanced to log sequence 24024
    Current log# 3 seq# 24024 mem# 0: /u020/apps/oracle/oradata/BAAN/redo03.log
    Mon May 28 11:31:05 2007
    Thread 1 advanced to log sequence 24025
    Current log# 2 seq# 24025 mem# 0: /u020/apps/oracle/oradata/BAAN/redo02.log
    Mon May 28 14:36:13 2007
    Thread 1 advanced to log sequence 24026
    Current log# 1 seq# 24026 mem# 0: /u020/apps/oracle/oradata/BAAN/redo01.log
    Do I need to tune the redo log? Each of redo log file is 50MB. It switched more frequent when there are not many users than real busy hours.
    null

    Select may or may not generate redo. Delayed block cleanout is one of the reasons for a query to produce redo: https://metalink.oracle.com/metalink/plsql/f?p=130:14:2631437878498686237::::p14_database_id,p14_docid,p14_show_header,p14_show_help,p14_black_frame,p14_font:NOT,40689.1,1,1,1,helvetica#aref1
    Another reason is locking the rows with "for update":
    SQL> create table t1 as select * from all_objects;
    Table created.
    SQL> set autot trace stat
    SQL> select * from t1;
    39310 rows selected.
    Statistics
              0  recursive calls
              0  db block gets
           3117  consistent gets
            538  physical reads
              0  redo size
        2524195  bytes sent via SQL*Net to client
          18612  bytes received via SQL*Net from client
           2622  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
          39310  rows processed
    SQL> select * from t1 for update;
    39310 rows selected.
    Statistics
             24  recursive calls
          40020  db block gets
          43446  consistent gets
            625  physical reads
        7754052  redo size
        3501635  bytes sent via SQL*Net to client
          18612  bytes received via SQL*Net from client
           2622  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
          39310  rows processed

  • Can you check for data in one table or another but not both in one query?

    I have a situation where I need to link two tables together but the data may be in another (archive) table or different records are in both but I want the latest record from either table:
    ACCOUNT
    AccountID     Name   
    123               John Doe
    124               Jane Donaldson           
    125               Harold Douglas    
    MARKETER_ACCOUNT
    Key     AccountID     Marketer    StartDate     EndDate
    1001     123               10526          8/3/2008     9/27/2009
    1017     123               10987          9/28/2009     12/31/4712    (high date ~ which means currently with this marketer)
    1023     124               10541          12/03/2010     12/31/4712
    ARCHIVE
    Key     AccountID     Marketer    StartDate     EndDate
    1015     124               10526          8/3/2008     12/02/2010
    1033     125               10987         01/01/2011     01/31/2012  
    So my query needs to return the following:
    123     John Doe                        10526     8/3/2008     9/27/2009
    124     Jane Donaldson             10541     12/03/2010     12/31/4712     (this is the later of the two records for this account between archive and marketer_account tables)
    125     Harold Douglas               10987          01/01/2011     01/31/2012     (he is only in archive, so get this record)
    I'm unsure how to proceed in one query.  Note that I am reading in possibly multiple accounts at a time and returning a collection back to .net
    open CURSOR_ACCT
              select AccountID
              from
                     ACCOUNT A,
                     MARKETER_ACCOUNT M,
                     ARCHIVE R
               where A.AccountID = nvl((select max(M.EndDate) from Marketer_account M2
                                                    where M2.AccountID = A.AccountID),
                                                      (select max(R.EndDate) from Archive R2
                                                    where R2.AccountID = A.AccountID)
                   and upper(A.Name) like parameter || '%'
    <can you do a NVL like this?   probably not...   I want to be able to get the MAX record for that account off the MarketerACcount table OR the max record for that account off the Archive table, but not both>
    (parameter could be "DO", so I return all names starting with DO...)

    if I understand your description I would assume that for John Dow we would expect the second row from marketer_account  ("high date ~ which means currently with this marketer"). Here is a solution with analytic functions:
    drop table account;
    drop table marketer_account;
    drop table marketer_account_archive;
    create table account (
        id number
      , name varchar2(20)
    insert into account values (123, 'John Doe');
    insert into account values (124, 'Jane Donaldson');
    insert into account values (125, 'Harold Douglas');
    create table marketer_account (
        key number
      , AccountId number
      , MktKey number
      , FromDt date
      , ToDate date
    insert into marketer_account values (1001, 123, 10526, to_date('03.08.2008', 'dd.mm.yyyy'), to_date('27.09.2009', 'dd.mm.yyyy'));
    insert into marketer_account values (1017, 123, 10987, to_date('28.09.2009', 'dd.mm.yyyy'), to_date('31.12.4712', 'dd.mm.yyyy'));
    insert into marketer_account values (1023, 124, 10541, to_date('03.12.2010', 'dd.mm.yyyy'), to_date('31.12.4712', 'dd.mm.yyyy'));
    create table marketer_account_archive (
        key number
      , AccountId number
      , MktKey number
      , FromDt date
      , ToDate date
    insert into marketer_account_archive values (1015, 124, 10526, to_date('03.08.2008', 'dd.mm.yyyy'), to_date('02.12.2010', 'dd.mm.yyyy'));
    insert into marketer_account_archive values (1033, 125, 10987, to_date('01.01.2011', 'dd.mm.yyyy'), to_date('31.01.2012', 'dd.mm.yyyy'));
    select key, AccountId, MktKey, FromDt, ToDate
         , max(FromDt) over(partition by AccountId) max_FromDt
      from marketer_account
    union all
    select key, AccountId, MktKey, FromDt, ToDate
         , max(FromDt) over(partition by AccountId) max_FromDt
      from marketer_account_archive;
    with
    basedata as (
    select key, AccountId, MktKey, FromDt, ToDate
      from marketer_account
    union all
    select key, AccountId, MktKey, FromDt, ToDate
      from marketer_account_archive
    basedata_with_max_intervals as (
    select key, AccountId, MktKey, FromDt, ToDate
         , row_number() over(partition by AccountId order by FromDt desc) FromDt_Rank
      from basedata
    filtered_basedata as (
    select key, AccountId, MktKey, FromDt, ToDate from basedata_with_max_intervals where FromDt_Rank = 1
    select a.id
         , a.name
         , b.MktKey
         , b.FromDt
         , b.ToDate
      from account a
      join filtered_basedata b
        on (a.id = b.AccountId)
    ID NAME                     MKTKEY FROMDT     TODATE
    123 John Doe                  10987 28.09.2009 31.12.4712
    124 Jane Donaldson            10541 03.12.2010 31.12.4712
    125 Harold Douglas            10987 01.01.2011 31.01.2012
    If your tables are big it could be necessary to do the filtering (according to your condition) in an early step (the first CTE).
    Regards
    Martin

  • Grouped and non-grouped SELECT in one query: help!

    look first at: Wrong result when I use CASE on this forum. Here I wanted to get the user who created and the user who solved a problem (Lets call it Validation Error from now on (VE)).
    The thing is: I already have a query who returns me lots of information about a VE.
    The query in the previous thread returned me additional info about that VE (that is the creating_user and the solving_user). The 1st query is no group select, but the second is! Still, I need to combine those two in one query.
    1st query:
    select ve.seq,
         max((case vah.action when 'C' then vah.ur_code else null end)) created,
         max((case vah.action when 'S' then vah.ur_code else null end)) solved
    from validation_errors ve
    left outer join ver_action_histories vah
    on (ve.seq = vah.ver_seq AND ve.log_date = vah.ver_log_date)
    where ve.seq = 12860687
    group by ve.seq;Result:
    seq       | created | solved
    12860687    Bob       Bobdont mind the "where"-clause, it is just to make the query go faster
    what I do is: I join the VE with the ver_action_histories table which contains the users and what action they performed on a VE.
    Now I just want to add that information to the results of an other query which also returns lots of information about a VE.
    2nd query:
    select ve.seq "VE seq", mh.seq "Counter seq",
              ve.log_date, ve.solve_date, ve.solved Status, ve.failure_code, ve.mde_code,
              mh.meter_type,
              iv.mr_type, iv.mr_reason,
              ih.mmr_seq
    from validation_errors ve
    inner join meter_histories mh
    on (ve.mhy_seq = mh.seq)
    left outer join index_values iv
    on (ve.mhy_seq = iv.mhy_seq AND ve.log_date =iv.timestamp)
    left outer join index_histories ih
    on (ve.mhy_seq = ih.ive_mhy_seq)
    where ve.seq = 8653936
    and sysdate >= mh.start_date
    and sysdate < mh.end_date;dont mind the "where" and "and"-clauses ... I hope the result of this query will simplify things ...
    Result:
    seq        |   counter seq | log_date | solved_date | status    | failure_code | ...
    12860687       4568          1-jan-06   2-jan-06      Solved      ABCNow the actual question: Is it possible to combine those queries in one query? I just want the results of the first query (creating_user and solving_user) to be added as columns to the second result. Performance is very important. Please tell me that its possible?
    Wanted Result:
    seq        |   counter seq | log_date | solved_date | status    | failure_code | created  | solved  | ...
    12860687       4568          1-jan-06   2-jan-06      Solved      ABC            Bob        BobIf anything I explained is unclear, please tell so I can try to explain it in an easier way.

    Try an in line view:
    select *
    from
    ( <your first query goes here > ) a
    , ( <your second query goes here > ) b
    where a.seq = b.seq

  • Crystal Report Many to One Query Config error when using DataSet.ReadXML me

    When I build a dataset with this method numerous relations are automatically created. I then map these fields onto crystal reports with ADO.net data connection. However when I run the report the following error occurs:
    CrystalDecisions.CrystalReports.Engine.InternalException: Cannot determine the queries necessary to get data for this report.Details:
    This query cannot be performed. The link order requires many to one query configuration, which is not supported. Please rearrange the links.
    If I remove the links (relations) i get duplicate data on the report. Is there any way to resolve this or a patch for the error?

    Hello, Mervin;
    Since you are using ADO.NET dataset, is it possible to get all of the fields you need in one SQL Query outside of Crystal Reports?
    If that is possible, you can use that dataset to create an XML or XSD file to use as the structure for your report.
    VB
    'Using the full path to the .xml file, include the schema
    dataSet.WriteXml("C:\temp\test.xml", XmlWriteMode.WriteSchema)
    or
    dataSet.WriteXmlSchema("c:\temp\testXML.xsd")
    Now create a new report with the ADO.NET(XML) connection and point to either the XML or XSD you created. XML is useful because you can view data in the report designer for final formatting of the report.
    Now there is only one datasource and no linking is required in Crystal Reports. That should resolve the one to many issue.
    Another useful tool is to group on the many and place all the fields normally in the detail section into that group header. Suppress the Detail and Group footer sections. The Group Header will now look like a Detail section and each distinct value will only appear once. You can group on one field or a combination (using a formula field) to get the results you need. Test this to be sure you do not miss anything you want to see.
    Elaine

  • Running a  BEx report with more than one query in Background

    I am having a workbook with 2 queries .This workbook needs to be executed at a particular time every day and then save this file to a application server location .
    The file name has to dynamic, as everday a new file has to be created with some date stamp.
    Please let me know the steps/ ideas to achieve this

    Sudhakar,
    are you sure that it has to b a workbook ? running queries independently can be done .. am not sure if a workbook can be scheduled to run...
    One alternative is to use APD - have the queries run and populate two ODS and then have these ODS in a multiprovider and have one query output for the same - seems to be a very longworkaround...
    Another option is to have the queries executed in an ABAP programme and then have the results in an internal table and push both the result sets into an excel sheet ad save it in the application server.
    For reading queries in ABAP there is a functionmodule for the same .. something like RSDRI_INFOPROV_READ .. I am not too sure of the name but there is a function module for sure..
    Hope it helps..
    Arun
    Assign points if it helps..

  • BI 7.0 : Refresh of only one Query with VBA in  a MultiQueryWorkbook

    Does anyone know how to refresh only one query with VBA in a Workbook with several queries on different sheets?

    Hello together,
    thanks for your replies.
    In the backend EHP1 is installed and I think we don't need an extra update for the frontend. But in the VBA code of the frontend the code didn't changed.
    Our BEX Analyzer Addin version is:  7100.4.1100.34
    BEx Patch Level is: Support Package 11 Revision 1606
    The VBA code is:
    Public Function SAPBEXrefresh(allQueries As Boolean, Optional atCell As Range) As Integer
    'In the 7.0 Analyzer, ALL the items in the workbook can be refreshed, but refreshing
    'a query individually is not supported
    On Error Resume Next
      extErrorBegin ("3.x API SAPBEXRefresh called")
      If allQueries = True Then
        Common.MenuRefresh
        SAPBEXrefresh = 0
      Else
        SAPBEXrefresh = 700
        p_extErrorText = "With 7.0, this API is partly supported to refresh ALL items in the workbook, NOT an individual Query"
      End If
      extErrorEnd
    End Function
    As you can see a individually query with this VBA code is still not supported.
    Does anyone know how to change this code or if we need a special update?
    Daniel
    Edited by: Marc Schlipphak on Jan 19, 2010 7:35 PM

  • Update multiple UDF from one query generator

    Hi All,
    I have Form1 with multiple UDF1 which have been key in by users
    And another Form2 with multiple UDF2 which exactly same with Form1 UDF1
    Is there a way that I can copy multiple UDF at Form2UDF2 from Form1UDF1 instead of creating query for each individual UDF, where in query generator I can select more the one column but only first column will be insert to the single UDF.
    Thanks

    Hi Firos,
    I mean I have 7UDF in the Payment Form where the information to this UDF are come from 7UDF in the invoice form which already created previously so I would like to copy those UDF from invoice to UDF in payment by using single query to capture all the UDF information by doing:
    SELECT T0.[DocNum], T0.[UDF1], T0.[UDF2], T0.[UDF3], T0.[UDF4], T0.[UDF5], T0.[UDF6], T0.[UDF7]
    FROM OINV T0 WHERE T0.[CardCode] = $[ORCT.CardCode]
    From above query can I pass the result directly to UDF in Payment Form? or I need to create one query for each individual UDF.
    Thanks

  • Update SAME column name in two tables from ONE query

    Dear All Seniors
    Please tell me is it possible to update a same column name in two tables.
    I have two tables in same schema
    (1)table name
    pem.igp_parent
    column name
    igp_no.
    igp_type
    (2)table name
    pem.igp_child
    column name
    igp_no.
    igp_type
    i want to update igp_no column in one query please tell me how it would be possible.
    thanks
    yassen

    You want to update the data from what to what? Where is the new data coming from?
    If you are trying to put the same data in two different tables, that strongly implies that you have a normalization problem that needs to be addressed.
    Why do you want a single query rather than updating each table in turn? Can you join the two target tables to produce a key-preserved view?
    Justin

Maybe you are looking for