To fetch Data from multiple database tables!

How to fetch Data from fields of multiple database tables!
Give me one example!

use <b>join....</b>
c the SAPHELP docs...
FROM tabref1 [INNER] JOIN tabref2 ON cond
Effect
The data is to be selected from transparent database tables and/or views determined by tabref1 and tabref2. tabref1 and tabref2 each have the same form as in variant 1 or are themselves Join expressions. The keyword INNER does not have to be specified. The database tables or views determined by tabref1 and tabref2 must be recognized by the ABAP Dictionary.
In a relational data structure, it is quite normal for data that belongs together to be split up across several tables to help the process of standardization (see relational databases). To regroup this information into a database query, you can link tables using the join command. This formulates conditions for the columns in the tables involved. The inner join contains all combinations of lines from the database table determined by tabref1 with lines from the table determined by tabref2, whose values together meet the logical condition (join condition) specified using ON>cond.
Inner join between table 1 and table 2, where column D in both tables in the join condition is set the same:
Table 1                      Table 2
A
B
C
D
D
E
F
G
H
a1
b1
c1
1
1
e1
f1
g1
h1
a2
b2
c2
1
3
e2
f2
g2
h2
a3
b3
c3
2
4
e3
f3
g3
h3
a4
b4
c4
3
|--|||--|
    Inner Join
    |--||||||||--|
    | A  | B  | C  | D  | D  | E  | F  | G  | H  |
    |--||||||||--|
    | a1 | b1 | c1 | 1  | 1  | e1 | f1 | g1 | h1 |
    | a2 | b2 | c2 | 1  | 1  | e1 | f1 | g1 | h1 |
    | a4 | b4 | c4 | 3  | 3  | e2 | f2 | g2 | h2 |
    |--||||||||--|
Example
Output a list of all flights from Frankfurt to New York between September 10th and 20th, 2001 that are not sold out:
DATA: DATE   LIKE SFLIGHT-FLDATE,
      CARRID LIKE SFLIGHT-CARRID,
      CONNID LIKE SFLIGHT-CONNID.
SELECT FCARRID FCONNID F~FLDATE
    INTO (CARRID, CONNID, DATE)
    FROM SFLIGHT AS F INNER JOIN SPFLI AS P
           ON FCARRID = PCARRID AND
              FCONNID = PCONNID
    WHERE P~CITYFROM = 'FRANKFURT'
      AND P~CITYTO   = 'NEW YORK'
      AND F~FLDATE BETWEEN '20010910' AND '20010920'
      AND FSEATSOCC < FSEATSMAX.
  WRITE: / DATE, CARRID, CONNID.
ENDSELECT.
If there are columns with the same name in both tables, you must distinguish between them by prefixing the field descriptor with the table name or a table alias.

Similar Messages

  • How to fetch data from single database table using 2 internal tables.

    Hi friends,
    i am a new user of ABAP and also SDN.
    i need a help. 
    i want to fetch data from one database table based on primary keys of 2 internal tables.  how to put in where clause.
    Thanks in advance.

    hii
    refer to following code ..i hope it will help you
    SELECT matnr                         " Material Number
        FROM mara
        INTO TABLE i_mara
       WHERE matnr IN s_matnr.
      IF i_mara[] IS NOT INITIAL.
        SELECT matnr                       " Material Number
               werks                       " Plants
               prctr                       " Profit Center
          FROM marc
          INTO TABLE i_marc
           FOR ALL ENTRIES IN i_mara
         WHERE matnr = i_mara-matnr
           AND werks IN s_werks.
      ENDIF.                               " IF i_mara[] IS NOT INITIAL
      i_output = i_marc.
      IF i_marc[] IS NOT INITIAL.
        SELECT matnr                       " Material Number
               werks                       " Plants
               lgort                       " Storage Location
          FROM mard
          INTO TABLE i_mard
           FOR ALL ENTRIES IN i_marc
         WHERE matnr EQ i_marc-matnr
           AND werks EQ i_marc-werks
           AND lgort IN s_lgort.
      ENDIF.                               " IF i_mara[] IS NOT INITIAL
    regards
    twinkal

  • Fetch data from different database tables

    Hi...
    How can i fetch data from different database tables and put it into a internal table and then display it??? Can provide simple short codes as i'm new to ABAP. Thanks.

    Hi,
    Check this sample code..
    TYPE-POOLS: slis.
    DATA: BEGIN OF itab OCCURS 0,
            vbeln TYPE vbeln,
            expand,
          END OF itab.
    DATA: BEGIN OF itab1 OCCURS 0,
            vbeln TYPE vbeln,
            posnr TYPE posnr,
            matnr TYPE matnr,
            netpr TYPE netpr,
          END OF itab1.
    DATA: t_fieldcatalog TYPE slis_t_fieldcat_alv.
    DATA: s_fieldcatalog TYPE slis_fieldcat_alv.
    s_fieldcatalog-col_pos = '1'.
    s_fieldcatalog-fieldname = 'VBELN'.
    s_fieldcatalog-tabname   = 'ITAB'.
    s_fieldcatalog-rollname  = 'VBELN'.
    s_fieldcatalog-outputlen = '12'.
    APPEND s_fieldcatalog TO t_fieldcatalog.
    CLEAR: s_fieldcatalog.
    s_fieldcatalog-col_pos = '1'.
    s_fieldcatalog-fieldname = 'VBELN'.
    s_fieldcatalog-tabname   = 'ITAB1'.
    s_fieldcatalog-rollname  = 'VBELN'.
    s_fieldcatalog-outputlen = '12'.
    APPEND s_fieldcatalog TO t_fieldcatalog.
    CLEAR: s_fieldcatalog.
    s_fieldcatalog-col_pos = '2'.
    s_fieldcatalog-fieldname = 'POSNR'.
    s_fieldcatalog-tabname   = 'ITAB1'.
    s_fieldcatalog-rollname  = 'POSNR'.
    APPEND s_fieldcatalog TO t_fieldcatalog.
    CLEAR: s_fieldcatalog.
    s_fieldcatalog-col_pos = '3'.
    s_fieldcatalog-fieldname = 'MATNR'.
    s_fieldcatalog-tabname   = 'ITAB1'.
    s_fieldcatalog-rollname  = 'MATNR'.
    APPEND s_fieldcatalog TO t_fieldcatalog.
    CLEAR: s_fieldcatalog.
    s_fieldcatalog-col_pos = '4'.
    s_fieldcatalog-fieldname = 'NETPR'.
    s_fieldcatalog-tabname   = 'ITAB1'.
    s_fieldcatalog-rollname  = 'NETPR'.
    s_fieldcatalog-do_sum    = 'X'.
    APPEND s_fieldcatalog TO t_fieldcatalog.
    CLEAR: s_fieldcatalog.
    DATA: s_layout TYPE slis_layout_alv.
    s_layout-subtotals_text            = 'SUBTOTAL TEXT'.
    s_layout-key_hotspot = 'X'.
    s_layout-expand_fieldname = 'EXPAND'.
    SELECT vbeln UP TO 100 ROWS
           FROM
           vbak
           INTO TABLE itab.
    IF NOT itab[] IS INITIAL.
      SELECT vbeln posnr matnr netpr
             FROM vbap
             INTO TABLE itab1
             FOR ALL ENTRIES IN itab
             WHERE vbeln = itab-vbeln.
    ENDIF.
    DATA: v_repid TYPE syrepid.
    v_repid = sy-repid.
    DATA: s_keyinfo TYPE slis_keyinfo_alv.
    s_keyinfo-header01 = 'VBELN'.
    s_keyinfo-item01   = 'VBELN'.
    CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
         EXPORTING
              i_callback_program = v_repid
              is_layout          = s_layout
              it_fieldcat        = t_fieldcatalog
              i_tabname_header   = 'ITAB'
              i_tabname_item     = 'ITAB1'
              is_keyinfo         = s_keyinfo
         TABLES
              t_outtab_header    = itab
              t_outtab_item      = itab1
         EXCEPTIONS
              program_error      = 1
              OTHERS             = 2.
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Thanks
    Naren

  • How to fetch data from multiple fact tables from a normalized schema?

    Hello everybody,
    I am working on a normalized schema to build my repository. I have categorized the tables into dimensions and facts. I have 3 fact tables in my schema and they have a 1:m:1 relationship i.e. if I have table A, B, and C; A has 1:m relationship with B and C also has 1:m relationship with B. How can I use measures from these tables to create a star schema. If A = Sales, B = Transaction, C = Payment_Amount
    Sales(Sales ID, Amount, Tax pct, ...)
    Transaction(Transaction ID, Sales ID, Payment ID,Transaction Amt, ...)
    Payment_Amount(Payment ID, Check ID, Payment Made, ...)
    Please give me some direction to pursue.
    Thank you!
    D

    Hi dcole,
    Go through this link for snowflake schema http://gerardnico.com/wiki/datamodeling/snowflake_
    http://www.rittmanmead.com/2007/06/19/obiee-data-modeling-tips-1-integrating-1-1-and-1-many-source-tables/
    I suppose it should work with snowflake schema...Im interested in this topic please let me know what is your approach every now and then.
    By,
    KK

  • Generic datasource by function module to fetch data from multiple tables?

    I'm writing a function module to fetch price, for generic datasource.
    At first, extract test is OK. But InfoPackage never stop  when loading data to PSA in BW.
    And I find the example codes:
         OPEN CURSOR WITH HOLD S_CURSOR FOR
          SELECT (S_S_IF-T_FIELDS) FROM SFLIGHT
                                   WHERE CARRID  IN L_R_CARRID AND
                                         CONNID  IN L_R_CONNID.
        ENDIF.                             "First data package ?
    * Fetch records into interface table.
    *   named E_T_'Name of extract structure'.
        FETCH NEXT CURSOR S_CURSOR
                   APPENDING CORRESPONDING FIELDS
                   OF TABLE E_T_DATA
                   PACKAGE SIZE S_S_IF-MAXSIZE.
        IF SY-SUBRC <> 0.
          CLOSE CURSOR S_CURSOR.
          RAISE NO_MORE_DATA.
        ENDIF.
        S_COUNTER_DATAPAKID = S_COUNTER_DATAPAKID + 1.
      ENDIF.
    There using Cursor to fetch data package by package, and raise exception NO_MORE_DATA to stop the loading process.
    Now I fetch data from multiple tables, I don't think I can use Cursor.
    Then How can I handle this?  
    Thanks a lot.

    Thanks
    IF IT_999[] IS INITIAL.
        SELECT A~KNUMH A~MATNR A~KSCHL VKORG VTWEG A~DATBI A~DATAB KBETR KMEIN KPEIN C~MTART APPENDING CORRESPONDING FIELDS OF
          TABLE TP_DATA
            FROM A999 AS A
              INNER JOIN KONP AS B
                  ON A~KNUMH = B~KNUMH
              INNER JOIN MARA AS C
                 ON A~MATNR = C~MATNR
    *          FOR ALL ENTRIES IN IT_999
                    WHERE
    *      A~KNUMH = IT_999-KNUMH  AND
           ( ( A~KSCHL = 'ZPRC' AND VKORG = 'Z000' AND VTWEG = 'Z1' ) OR
                          ( A~KSCHL = 'ZPRD' AND VKORG = 'A000' AND VTWEG = 'Y3' ) ) AND
    *                      A~DATBI >= SY-DATUM AND
                          LOEVM_KO = ''.
        SELECT A~KNUMH A~MATNR A~KSCHL VKORG VTWEG A~DATBI A~DATAB KBETR AS KHETR  KMEIN KPEIN C~MTART APPENDING CORRESPONDING FIELDS OF
          TABLE TP_DATA
            FROM A999 AS A
              INNER JOIN KONP AS B
                  ON A~KNUMH = B~KNUMH
              INNER JOIN MARA AS C
                 ON A~MATNR = C~MATNR
    *          FOR ALL ENTRIES IN IT_999
                    WHERE
    *      A~KNUMH = IT_999-KNUMH AND
          A~KSCHL = 'ZPR3' AND A~VKORG = 'I000' AND
    *                      DATBI >= SY-DATUM AND
                          LOEVM_KO = ''.
      ENDIF.
      IF IT_997[] IS INITIAL.
        SELECT A~KNUMH A~MATNR A~KSCHL VTWEG A~DATBI A~DATAB KBETR AS KHETR KMEIN KPEIN C~MTART APPENDING CORRESPONDING FIELDS OF
          TABLE TP_DATA
            FROM A997 AS A
              INNER JOIN KONP AS B
                  ON A~KNUMH = B~KNUMH
              INNER JOIN MARA AS C
                 ON A~MATNR = C~MATNR
    *          FOR ALL ENTRIES IN IT_997
                    WHERE
    *      A~KNUMH = IT_997-KNUMH      AND
          A~KSCHL = 'ZPRA' AND VTWEG = 'Y1' AND
    *                      DATBI >= SY-DATUM AND
                      LOEVM_KO = ''.
      ENDIF.
      IF IT_996[] IS INITIAL.
        SELECT A~KNUMH A~MATNR A~KSCHL A~DATBI A~DATAB KBETR AS KHETR KMEIN KPEIN C~MTART APPENDING CORRESPONDING FIELDS OF
           TABLE TP_DATA
             FROM A996 AS A
               INNER JOIN KONP AS B
                   ON A~KNUMH = B~KNUMH
               INNER JOIN MARA AS C
                  ON A~MATNR = C~MATNR
    *          FOR ALL ENTRIES IN IT_996
                    WHERE
    *      A~KNUMH = IT_996-KNUMH AND
          A~KSCHL = 'ZPRB' AND
    *                       DATBI >= SY-DATUM AND
          LOEVM_KO = ''.
      ENDIF.
      SELECT   MATNR     "u7269u6599u53F7u7801
               MEINH     "u4ED3u50A8u5355u4F4Du7684u5907u7528u8BA1u91CFu5355u4F4D
               UMREZ     "u57FAu672Cu8BA1u91CFu5355u4F4Du8F6Cu6362u5206u5B50
               UMREN     "u8F6Cu6362u4E3Au57FAu672Cu8BA1u91CFu5355u4F4Du7684u5206u6BCD
          FROM MARM
          INTO CORRESPONDING FIELDS OF TABLE IT_MARM
           FOR ALL ENTRIES IN TP_DATA
         WHERE MATNR = TP_DATA-MATNR AND  MEINH = TP_DATA-KMEIN.
      LOOP AT TP_DATA.
        IF TP_DATA-KPEIN NE 0.
          TP_DATA-KBETR =  TP_DATA-KBETR / TP_DATA-KPEIN.
          TP_DATA-KHETR =  TP_DATA-KHETR / TP_DATA-KPEIN.
        ENDIF.
        IF TP_DATA-KSCHL = 'ZPRA'.
    *       TP_DATA-MEINH = 'ZI'.
    *      TP_DATA-KSCHL = 'B4'.
          IF TP_DATA-KMEIN = 'ZI'.
            TP_DATA-KBETR = TP_DATA-KHETR / '1.17'.
          ELSE.
            READ TABLE IT_MARM INTO WA_MARM1 WITH KEY MATNR = TP_DATA-MATNR MEINH = TP_DATA-KMEIN.
    *           READ TABLE IT_MARM INTO WA_MARM2 WITH KEY MATNR = TP_DATA-MATNR MEINH = 'CT'.
            TP_DATA-KHETR = TP_DATA-KHETR * WA_MARM1-UMREN / WA_MARM1-UMREZ.
    *           * WA_MARM2-UMREZ / WA_MARM2-UMREN.
            TP_DATA-KBETR = TP_DATA-KHETR / '1.17'.
          ENDIF.
        ELSEIF TP_DATA-KSCHL = 'ZPRB'.
    *      TP_DATA-KSCHL = 'L0'.
    *       TP_DATA-MEINH = 'ZI'.
          IF TP_DATA-KMEIN = 'ZI'.
            TP_DATA-KBETR = TP_DATA-KHETR / '1.17'.
          ELSE.
            READ TABLE IT_MARM INTO WA_MARM1 WITH KEY MATNR = TP_DATA-MATNR MEINH = TP_DATA-KMEIN.
    *           READ TABLE IT_MARM INTO WA_MARM2 WITH KEY MATNR = TP_DATA-MATNR MEINH = 'BAG'.
            TP_DATA-KHETR = TP_DATA-KHETR * WA_MARM1-UMREN / WA_MARM1-UMREZ.
    *           * WA_MARM2-UMREZ / WA_MARM2-UMREN.
            TP_DATA-KBETR = TP_DATA-KHETR / '1.17'.
          ENDIF.
        ELSEIF TP_DATA-KSCHL = 'ZPRC' OR TP_DATA-KSCHL = 'ZPRD'.
    *       TP_DATA-MEINH = 'ZI'.
          IF TP_DATA-KMEIN = 'ZI'.
            TP_DATA-KHETR = TP_DATA-KBETR * '1.17'.
          ELSE.
            READ TABLE IT_MARM INTO WA_MARM1 WITH KEY MATNR = TP_DATA-MATNR MEINH = TP_DATA-KMEIN.
    *           READ TABLE IT_MARM INTO WA_MARM2 WITH KEY MATNR = TP_DATA-MATNR MEINH = 'WZI'.
            TP_DATA-KBETR = TP_DATA-KBETR * WA_MARM1-UMREN / WA_MARM1-UMREZ.
    *           * WA_MARM2-UMREZ / WA_MARM2-UMREN.
            TP_DATA-KHETR = TP_DATA-KBETR * '1.17'.
          ENDIF.
        ELSEIF TP_DATA-KSCHL = 'ZPR3'.
    *      TP_DATA-KSCHL = 'B2'.
          IF TP_DATA-KMEIN = 'ZI'.
            TP_DATA-KBETR = TP_DATA-KHETR / '1.17'.
          ELSE.
            READ TABLE IT_MARM INTO WA_MARM1 WITH KEY MATNR = TP_DATA-MATNR MEINH = TP_DATA-KMEIN.
    *           READ TABLE IT_MARM INTO WA_MARM2 WITH KEY MATNR = TP_DATA-MATNR MEINH = 'BAG'.
            TP_DATA-KHETR = TP_DATA-KHETR * WA_MARM1-UMREN / WA_MARM1-UMREZ.
    *           * WA_MARM2-UMREZ / WA_MARM2-UMREN.
            TP_DATA-KBETR = TP_DATA-KHETR / '1.17'.
          ENDIF.
        ENDIF.
        TP_DATA-MEINH = '01'.
        MODIFY TP_DATA.
    E_T_DATA-MATNR =   TP_DATA-MATNR.
    E_T_DATA-KSCHL =   TP_DATA-KSCHL.
    E_T_DATA-KHETR =   TP_DATA-KHETR.
    E_T_DATA-KBETR =   TP_DATA-KBETR.
    E_T_DATA-KMEIN =   TP_DATA-KMEIN.
    E_T_DATA-DATAB =   TP_DATA-DATAB.
    E_T_DATA-DATBI =   TP_DATA-DATBI.
    APPEND E_T_DATA.
        CLEAR WA_MARM1.
        CLEAR WA_MARM2.
      ENDLOOP.
    Edited by: Shen Peng on Oct 20, 2010 10:09 AM

  • Problem fetching data from multiple tables

    Hi,
    I am facing a problem in fetching data from 3 different tables. i am able to get the data from 2 tables but when i try accessing data from other table, i am getting redundant data. please help, my query is as under.
    select a.*,b.*, c.BidAmount from carregister a , watchlist b, Bidmaster c where a.CarID= b.CarID and b.UserID = 23 and c.BidAmount=(select max(BidAmount) from BidMaster where carid=a.carid group by c.BidAmount);
    Regards,
    Ujjwal B Soni
    <Software Developer>
    Baroda Gujarat India

    Hi,
    I got the solution. The solved query is as under :
    select a.*,b.*,(select max(BidAmount) from BidMaster where carid=b.carid) as MAX_AMT from carregister a , watchlist b where a.CarID= b.CarID and b.UserID=23;
    Thank you all for replying me.
    Warm Regards,
    Ujjwal B Soni
    <Software Developer>
    <Baroda Gujarat India>

  • Filters on non-conforming dimensions when fetching data from multiple facts

    Hi,
    I would like to confirm my understanding about how OBI fetches data from multiple facts. I have set up the BMM layer. Through Answers I am getting data from multiple facts as expected. However, is it necessary to base filters only on the conforming dimensions? If I do so, I am getting the correct data. But if I filter data on non-conforming dimensions, then I am getting more data which I am not expecting.
    Suppose, Fact1, Fact2 and Fact3 share a CommonDim dimension. If I have a filter on CommonDim, then the filter is used on the three fact tables. However, if I filter data based on Fact1's DimTwo which is not shared by Fact2 and Fact3 and I have measurements from all the fact tables, then from the SQL generated, it seems that OBI is fecting all data from Fact2 and Fact3 and data from Fact1 where DimTwo = 'SomeValue'. Then it seems to be merging the data from the three result sets.
    Is this expected, esp. a scenario where a filter is based on a non-conforming dimension (DimTwo in the example)? Have I missed anything? What do I need to do, if I want to return rows from Fact1 based on DimTwo's filter and then if there is data on Fact2 and Fact3 based on the value in CommonDim corresponding to DimTwo's filter?
    Please let me know.
    Thanks and regards,
    Manoj.
    PS.: I have got a link now which is http://obibb.wordpress.com/2010/06/06/multiple-fact-reporting-on-non-conforming-dimensions-part-ii/
    Edited by: mandix on 25-Oct-2011 12:01

    Hi
    The problem you describe is similar to mine (I wrote several threads ago).
    That is, if there is a non-conformed dimension in a report then the column from the fact table which is not connected with those non-conformed dimensions containes zeros or blanks.
    Was this problem solved? I didn't quite catch one of previuos messages... If you can please repeat it more detailed.
    What I tried to do is to set Total level in the Content tab (LTS properties). In this example - I could set Total level to JOBS in the plan type dimension. But it didn't help.
    So if you know what to do then please describe it here...

  • FETCH DATA FROM ORACLE DATABASE USING Web Dynpro

    I want to fetch data from ORACLE database using Web Dynpro.How can I do this?

    1) Are you sure that you get no results? It sounds like you are having name resolution issues, which would imply that you should be getting an ORA-00942 error indicating that the table doesn't exist (or that you don't have access to the table). If you are not seeing this error, I would tend to suspect an overzealous exception handler.
    2) What database account owns the table? What database account is your ASP.Net application using to connect? Assuming these two accounts are different, your application would either have to
    - Explicitly prefix the table name with the schema name
    - Have a public or private synonym that maps the table name to the fully qualified identifier schema_name.table_name
    - Issue the command ALTER SESSION SET CURRENT_SCHEMA = <<schema name>> in each session, in which case all queries in the session would use the specified schema name as the default if no schema name is prefixed.
    Justin

  • Can I restore the deleted statistical data from the database tables?

    Hi all,
       I have deleted the statistical data from the database tables like(Ex: RSDDSTAT, RSDDSTATWHM,..) by mistake through RSA1> Tools> BW Statistics for Infoproviders--> Delete.
    Is there any way to restore the deleted data back? Thanks in advance.

    Now I'm really confused-
    Your first post said
    "<b>I have deleted the statistical data from the database tables like(Ex: RSDDSTAT, RSDDSTATWHM</b>,..) by mistake through RSA1> Tools> BW Statistics for Infoproviders--> Delete."
    but your last respsonse said
    "I have deleted the BW Statistics data, <b>not the actual data in RSDDSTAT tables</b> through
    RSA1 -> Tools -> BW Statistics for InfoProviders -> clicked 'Delete' bin to delete data."
    If you used the RSA1 -> Tools -> BW Statistics for InfoProviders -> clicked 'Delete' - <b>then you deleted the data from the RSDDSTAT tables</b>. This assumes you accepted the default date range that would have popped up after the clicking on the Delete button which specified to delete thru the current date.  If this is what you did, the data is gone.  Your only hope is be to recover from a DB backup.  
    The data in the RSDDSTAT tables is what is used to feed the BW Statistics cubes, generally on a daily basis.

  • To fetch data from Oracle Database

    Hi Gents,
    Any alternative option other than SQL to fetch data from Oracle DAtabase. ( My manager worked on Mainframes he is telling other than SQL there should be some options.. Gents pls guide if any options.......
    REgards
    Fento

    >
    Any alternative option other than SQL to fetch data from Oracle DAtabase. ( My manager worked on Mainframes he is telling other than SQL there should be some options.. Gents pls guide if any options.......
    >
    There is no other (supported) way to get data from Oracle Databases as SQL. No matter what third-party tool you use to access Oracle Databases, they all will use (embedded) SQL.
    In very rare cases, one must use tools to read from datafiles directly because the database got damaged and a proper recovery is impossible. That is an emergency solution and by no means a replacement for SQL access.
    In short: No :-)
    Kind regards
    Uwe
    http://uhesse.wordpress.com

  • Fetch Data from two Database

    I want to fetch data from two tables which are in two separate database. Is it possible to fetch similar from two schemas of same database.
    Pls help with query.

    Hi,
    Say you have two schema S1 and S2 in the same database 'xyz' then you can create two database links to these two schemas from any third schema as ::
    CREATE database link s1link connect to S1 identified by <password of S1> using 'xyz' ;
    CREATE database link s2link connect to S2 identified by <password of S2> using 'xyz' ;
    Now say if there is a table called tab1 in schema S1, then you can get data from it as ::
    SELECT T1.*
    FROM tab1@s1link T1
    WHERE < you can put conditions here> ;
    Similarly for the columns of a table of schema S2.
    - Thanks
    Sandipan

  • Fetching data from a large table

    hi
    I am trying to fetch data from a table with 100 million rows. There are 5 conditions(AND) in the "WHERE" clause. Out of five columns there is composite non unique index on 2 columns. rest of the three columns are haing data with low cardinality.i just wana know what type of index is suggested for my query so that i can fetch the data immediately i.e. should i go for composite index on all the 5 columns. secondly there is continuous insertion also. if i create index on all the 5 columns how it effect my insertion.i am using 8i
    Thanx
    Tarun

    This forum is for posting feedback about the OTN site.
    The best place to get an answer to your question is a Database forum, perhaps the PL/SQL forum.

  • Authorization control when fetching data from PA OM tables

    Hi all,
    I want to know how to control DB level authorization using HR_READ_INFOTYPE and RP_READ_INFOTYPE. Taht is, i want to check whetehr the user who is executing a report is having read authorization for that infotype. If not, i should not fetch the data and the report should return error message?
    Instead of authorization (std, custom) object, i want to control when fetching data from PA and OM tables in HR. How to achieve the same?

    As EJP said, your query might have problem with the using clause. Post your query.
    It gives an exception when I try to run the query, and I'm trying to fetch all columns not only 'taskid'
    java.sql.SQLException: ORA-25154: column part of USING clause cannot have qualifier
    Yes, with the exact sql query he posted. It gives that exception.I guess you are trying to fetch all the columns by using the above query which i posted. No you should not fetch all the columns. Because the rs will only the three columns.
    Also, use 'as' with that query like,
    select t1.taskid as t1_taskid, t2.taskid as t2_taskid ,t3.taskid as t3_taskid from...Edited by: Ram on Aug 23, 2011 6:20 PM

  • Fetching Data from Multiple Services or End Applications in BPEL

    Hi,
    We do have a requirement of fetching the data from multiple services exposed by the end applications. And there are no inter dependencies among these.
    Mostly 6 to 10 partner links have to be used to fetch this data. So planning to use the flow N activity to achieve this.
    But i did come across a best practice to avoid the use o Flow N activity with number of lines. So i wanted to know pros and cons of this approach and i there is any better way of doing the same in BPEL.
    We are using SOA Suite 11.1.1.4.0.
    Thanks
    Siva

    any updates??

  • Fetch data from a R3 Table and send to XI

    Hello XI Experts,
                     I am involved in a scenario where i need to read some data from a Transparent table in R3 send to xi and post a CSV File.
    I have worked on look ups at the XI abap stack but i want to know which is the best solution to do this.
    What's the best way to read a table from R/3 and send to xi server. Is there any other ways besides Look ups? 
    Regards,
    Anirban.

    Hi,
    >>>1. When is look ups advised .
    a lookup is when somewhere in your
    interface flow you have to lookup some data
    for example you send data from one system to another but you have to change material numbers before
    sending the data to the target system
    you know that material numbers are inside some other server so you have to call this sever (very often in a sync way) to lookup the material numbers
    so this would be difficult with IDOC for instance
    >>> 2. Which is a better solution, if i have very few data to fetch with WAS >= 6.20 . Abap Proxy Or a 'Z' Idoc.
    you'll be able to do it quicker with ABAP proxy
    if you use a scheduled report that will send the data from r3 then use ABAP proxies
    Regards,
    michal

Maybe you are looking for

  • I can't install for my mac os x 10.5.8

    How can i download and install the latest flash player to my mac.When i try i don't see mac os x 10.5.8 system. It starts from 10.6. can you please help me solve this problem. Everytime i try i get error says "Report-Ignore" Help me please.

  • No connection between iphone 4s and car-adapter

    Hello, Have a question to iphone 4s in connection with my car - adapter for Volkswagen (Adapter-Article.No. 3C005143CD) My phone, updated to 5.1.1 (9B206) and since then is that impossible for bluethoth-connection. Is that correct or anyone to find a

  • Program Modification

    hello experts I have the following ALV report, (ZBB Program) <b>Material Document Listing Report</b> Currently this  report let us  drill down to some transaction where we would see standard costs(Drill down fields are Customer and Mterial number) No

  • Problem using the value of the variable in the KM options - Essbase Extract

    Hi, I am able to extract the data from Hyperion Essbase using the report script present in D:\ODIHome\oracledi\demo\hyperion. Instead of hardcoding the absolute file path in LKM options, I have requirement to use the value of variable, PIPHome and fo

  • How to extract a single colum form XML files and load in a table

    Hi below I have a structure of xml files , I just need to extarct <RecordReference>PQPMID:7358</RecordReference> from file and load in to oracle .. Please let me know how to do ..?? file content below HoldingsRecord>      <RecordReference>PQPMID:7358