Regarding joins

HI ANJI,
can i use join conditions like this...using BSID,BSIK,LFA1
SELECT ABELNR ABUDAT AVBELN BLIFNR CORT01 CORT02 CPSTLZ CSTRAS
INTO CORRESPONDING FIELDS OF TABLE ITAB FROM BSID AS A INNER JOIN BSIK
AS B ON ( ABUKRS = BBUKRS ) AND ( ABELNR = BBELNR ) INNER JOIN LFA1
AS C ON ( BLIFNR = CLIFNR ) WHERE BLIFNR IN VENDOR AND ABUDAT IN
P_DATE AND A~BUKRS = CMP_CD.
regards,
raman.

Hi
BSID is Customer related data
BSIK is Vendor related data
You can join BSIK with LFA1 table not BSID table
SELECT ABELNR ABUDAT AEBELN ALIFNR CORT01 CORT02 CPSTLZ CSTRAS
INTO CORRESPONDING FIELDS OF TABLE ITAB FROM BSIK AS A INNER JOIN LFA1
AS C ON ( ALIFNR = CLIFNR ) WHERE ALIFNR IN VENDOR AND ABUDAT IN
P_DATE AND A~BUKRS = CMP_CD.
<b>Reward points for useful Answers</b>
Regards
Anji

Similar Messages

  • Urgent: Regarding Join Syntax in Oracle 9i and 10g

    Dear Members
    Please help me by providing me the synatx of following Join statements for Oracle 9i and 10g:
    1.Inner Join
    2.Left Outer Join
    3.Right Outer Join
    4.Self Join
    5.Cross Join
    6.Full Outer Join
    N.B. I NEED THIS HELP URGENTLY
    Regards
    Praveen Kumar Pandey

    Inner join
    SELECT *
      FROM a,
           b
    WHERE a.<<column>> = b.<<column>>Left Outer Join
    SELECT *
      FROM a LEFT OUTER JOIN b
             ON a.<<column>> = b.<<column>>Right Outer Join
    SELECT *
      FROM a RIGHT OUTER JOIN b
             ON a.<<column>> = b.<<column>>Full Outer Join
    SELECT *
      FROM a FULL OUTER JOIN b
             ON a.<<column>> = b.<<column>>Self Join
    SELECT *
      FROM a a1,
           a a2
    WHERE a1.<<column>> = a2.<<column>>Cartesian Join
    SELECT *
      FROM a,
           bJustin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Doubt regarding joins in obiee

    hi gems...
    i have a doubt regarding BI analytics join.
    When i have imported all the tables from my schema in the repository, then it got imported with all the joins defined in the database.
    then i made several business models and create some reports.
    there i got some errors, which are mainly due to self join in the tables and more than one joins between two tables.
    my question is...are these two types of joins not supported in obiee???
    and if i want more than one join condition between two tables, then what can i do???
    thanks in advance...

    Hi User,
    OBIEE doesnot support self join. To avoid such circular joins ,make use of alias tables in the physical layer.The following is a list of the main reasons to create an alias table:
    To reuse an existing table more than once in your physical layer (without having to import it several times.
    To set up multiple alias tables, each with different keys, names, or joins.
    To help you design sophisticated star or snowflake structures in the business model layer. Alias tables are critical in the process of converting ER Schemas to Dimensional Schemas
    Rgds,
    Dpka

  • Regarding join tables

    Hi all,
            Can you give the difference between inner join and outer join
    thanks&regards
    venkat

    Hi,
    Check this..
    http://help.sap.com/saphelp_erp2004/helpdata/en/cf/21ec77446011d189700000e8322d00/frameset.htm
    http://help.sap.com/saphelp_erp2004/helpdata/en/f1/713c3b35703079e10000000a114084/frameset.htm

  • Regarding join statement

    SELECT  vbrkvbeln vbfavbelv
              vbrkfkdat vbrkkunag
              vbrpwerks kna1name1
                  FROM vbrk
                  INNER JOIN vbrp ON vbrkvbeln = vbrpvbeln
                  INNER JOIN vbfa ON vbfavbeln = vbrkvbeln
                  INNER JOIN kna1 ON kna1kunnr = vbrkkunag
                  INTO CORRESPONDING FIELDS OF TABLE INVTAB
                  WHERE vbrp~werks IN s_werks
                  AND vbrk~fkdat IN s_fkdat
                  AND vbrk~kunag IN s_kunag
                  AND vbrk~fkart IN ('ZF2','FVAT')
                  AND vbrk~fksto <> 'X'
                  AND vbrk~rfbsk = 'C'
                  AND vbrk~sfakn = ''
                  AND vbrk~inco1 = 'TWO'
                  AND VBRK~VKORG NE '5000'
                  AND vbfa~vbtyp_n = 'M'
                  AND vbfa~vbtyp_v = 'J'.
    i am writng this join statement
    but when displaying i am getting multiple records for a particular entry
    say for a particular documnet number if it is having N no. of line itmes and when searching in vbfa thenumber of preeecig documents are M then the resords that it is disp;laying is N*M.
    but in some cases it is showing records more than this
    can you please help me why it is showing more records.
    and in if you can explain me with an example with a dummy no of records how it will fetch record that will be a great help.

    Hi Ashish,
    please chk the following links for inner and outer join ,
    http://help.sap.com/saphelp_erp2004/helpdata/en/cf/21ec77446011d189700000e8322d00/frameset.htm
    http://www.sap-img.com/abap/several-nested-inner-join-statements-can-be-inefficient.htm
    http://www.thespot4sap.com/Articles/SAPABAPPerformanceTuning_InnerJoinStatement.asp
    now how to write join statements
    SELECT
    a~ebeln
    a~ebelp
    a~matnr
    a~txz01
    a~menge
    a~meins
    a~netpr
    a~brtwr
    a~netwr
    a~mwskz
    a~navnw
    a~effwr
    a~werks
    b~eindt
    FROM
    ekpo AS a
    INNER JOIN
    eket AS b
    ON
    aebeln = bebeln
    INTO
    TABLE t_ekpo
    WHERE
    a~ebeln = t_ekko_temp-ebeln
    AND b~ebeln = t_ekko_temp-ebeln.
    Think there are 2 tables . a right hand table and a left hand table.
    in inner join : only those fields having coresponding values in the left hand side table are selected.
    in outer join all the fields on the left hand side table are selected and the fields which have no corresponding values in the right hand side table are displayed as null values..
    Reward points if helpful
    Regards ,
    Amber S

  • Question regarding Joins and Union

    Hi All,
    Here is the question:
    I have two databases, on which I made a UNION to see both item codes and item names. The issue is that on one database I have an item with the same code than the other, but due human error, on the other database, I have the same name but with an "s" or something like that.
    What I need to do is, when I make a query, I want to see all item codes from both tables, but I want to see only the description from the db1.
    How can I do this?
                                  |      db1                  |    db 2
    ---------------------------   |  -------------------------  | ---------------------------   
    itemcode                 |     ART001            |   ART001
    item name               |     Rock                |   Rocks

    Pavan Patil wrote:
    In my select query I am using only one column (which is part of primary) while joining two base tables and one column of foreign key of other table to get data.
    My query here is whether I have to make use of all the columns of the composite primary key and foreign key to get the values and after making use of this whether performance of the query will be improved ? (Presently my qyery is taking 6.24 mins).
    This is not a question of performance but of what result you want. The result of joining on one column is logically quite different to joining on all of them. I strongly suspect that you will need to join on all three key columns to get a useful result - but that depends on what you are trying to achieve.

  • Regarding joins in  OBIEE tutorial in Oracle website " COSTS " no key

    OBIEE training material in oracle website ..while . Build Sample Oracle BI Enterprise Edition Reports and Dashboards
    http://www.oracle.com/technology/obe/obe_bi/bi_ee_1013/bi_admin/biadmin.html#t5
    in the documenatation
    while " *** Load a Prebuilt Repository ***** "
    A prebuilt repository is provided to expedite your completion of the remaining exercises in this OBE. The provided repository is similar to the repository you built in the first part of this OBE, but with the following relevant differences:
    Physical joins are built for the the COSTS physical table in the Physical layer.
    *********** Question **************
    --> HOW do i join Costs? whether to Sales Fact table Or any of Dimension tables ( CHANNELS , CUSTOMERS , TIMES , PRODUCTS, PROMOTIONS )
    is Costs is a dimension ?

    You don't need to do something. The repository SH_PartTwo.rpd have already the join. The tutorial gives only the differences with the SH_PartOne.rpd.
    The SH_PartTwo.rpd is in the SH.zip file.
    http://www.oracle.com/technology/obe/obe_bi/bi_ee_1013/bi_admin/files/SH.zip
    Cheers
    NIco

  • Regarding joining of two tables with same feilds

    hello gurus
    i am new to abap programming. i have to extract data from two tables ie coss and cosp tables . one table has 180 records and another table has 500 records i want to extract these two table records into internal table(680 records) and then i have to populate it to flatfile through gui download. can any one give me use code to work on it.these two tables has same set of feilds.

    Hi,
    First you should verify if you want to get all the data from both tables regardless if its the same record. If it is, then you can follow this logic:
    select * from coss into table it_coss_cosp. "step 1
    select * from cosp appending table it_coss_cosp. "step 2
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
      BIN_FILESIZE                  =
        filename                      = data.txt
      FILETYPE                      = 'ASC'
      APPEND                        = ' '
      WRITE_FIELD_SEPARATOR         = ' '
      HEADER                        = '00'
      TRUNC_TRAILING_BLANKS         = ' '
      WRITE_LF                      = 'X'
      COL_SELECT                    = ' '
      COL_SELECT_MASK               = ' '
      DAT_MODE                      = ' '
    IMPORTING
      FILELENGTH                    =
      tables
        data_tab                      = it_coss_cosp
    EXCEPTIONS
      FILE_WRITE_ERROR              = 1
      NO_BATCH                      = 2
      GUI_REFUSE_FILETRANSFER       = 3
      INVALID_TYPE                  = 4
      NO_AUTHORITY                  = 5
      UNKNOWN_ERROR                 = 6
      HEADER_NOT_ALLOWED            = 7
      SEPARATOR_NOT_ALLOWED         = 8
      FILESIZE_NOT_ALLOWED          = 9
      HEADER_TOO_LONG               = 10
      DP_ERROR_CREATE               = 11
      DP_ERROR_SEND                 = 12
      DP_ERROR_WRITE                = 13
      UNKNOWN_DP_ERROR              = 14
      ACCESS_DENIED                 = 15
      DP_OUT_OF_MEMORY              = 16
      DISK_FULL                     = 17
      DP_TIMEOUT                    = 18
      FILE_NOT_FOUND                = 19
      DATAPROVIDER_EXCEPTION        = 20
      CONTROL_FLUSH_ERROR           = 21
      OTHERS                        = 22
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    But if you plan to get those record which exists in both tables then use a join condition for your select statement.
    Hope this helps...
    P.S. Please award points for useful answers.

  • Regarding joining two internal tables

    Hi All,
    Tell me how to use 'UNION' in different ways.
    Thank you,
    Rohit

    Hi,
    If its internal table joining then best is to use APPEND LINES.... statement.
    You can also append internal tables to index tables using the following statement:
    APPEND LINES OF itab1 TO itab2.
    This statement appends the whole of ITAB1 to ITAB2. ITAB1 can be any type of table, but its line type must be convertible into the line type of ITAB2.
    When you append an index table to another index table, you can specify the lines to be appended as follows:
    APPEND LINES OF itab1 [FROM n1] [TO n2] TO itab2.
    n1 and n2 specify the indexes of the first and last lines of ITAB1 that you want to append to ITAB2.
    This method of appending lines of one table to another is about 3 to 4 times faster than appending them line by line in a loop. After the APPEND statement, the system field SY-TABIX
    contains the index of the last line appended. When you append several lines to a sorted table, you must respect the unique key (if defined), and not violate the sort order. Otherwise, a runtime error will occur.
    thanx.

  • Regarding joining mm

    one of my friend wants to joine mm course, he is basically bcom and mba.
    he has 2 years of domain experience of sales, and then 1.5 years of implementation experience in sme erps systems.
    he just want to take up mm , would one want engg background for understanding mm or it is only because of the competition.
    pl suggest the same, thanks in advance

    Hi
    If your friend want to join MM functional role, there is no need for any engineering background as such. But, domain experience in materials management function would definitely help in understanding the processes and concepts and being able to provide solutions.
    In short whether you are an engineer or a finance person or anything else, it doesn't matter as long as your conceptual knowledge is good.
    Cheers
    Jagadeesh

  • How to Join this condition

    Hi, I have a query regarding joins
    I have two tables named Master_table and Child_table. suppose assume that tables look like this
    Master_table
    ID name .. ..
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    100
    Child_table
    ID Date .. ..
    101
    102
    103
    104
    105
    1
    2
    3
    4
    109
    200
    I have some conditions and wrote a single query using views and joins and got some rows from Master table
    and also from child table. suppose assume I queried 50 results from Master table and 40 from child table
    now
    condition 1:
    I have to get the same ID's common data from both the tables so I wrote query as shown below
    to get that data I used this join condition master.ID = child.ID this works fine and returning the result ID
    as 1,2,3,4 that's fine
    conditon 2:
    Now I have to write the query that it shouldn't return the above ID's i.e 1,2,3,4 and return the remaining 46 IDs present in the
    master table query resultset (Actually our master table query returned 50 ID's)
    now my join condition is as shown below
    master.ID = child.ID(+) but it is returning 50 IDs I want only those 46 except those above 4 IDs.
    can any one help me out
    Thanks
    basu

    Thanks for your response
    I will be more clear regarding this query. Assume my Master table and child table have 100 rows each. No I used views and some conditions
    and get 50 results from my Master table view and 40 results from my Child table view .Now in those 50 and 40 I have common date assume 4 rows. Now I want to eliminate those 4 (not 40 rows in child table) rows from the 50(result set of master table)rows and get the remaining rows.

  • About Cross Join

    When I'm seeing an article about cross join I got a doubt. In that physical diagram they connected the the column-1 from table A and column 2 from table B.Table-A is xls and table-2 is Oracle.
    Now IN BMM layer they connected the col-1 and col-2 as foreign key join. I think In BMM layer we prefer to do complex join. Any idea to get an idea
    Thanks & Regards,
    Pallis

    Hi Pallis,
    Check my blog regarding joins; http://obibb.wordpress.com/2010/08/06/joins-in-oracle-bi-ee/
    From Answers a Logical query is fired. The BI Server fires two Physical queries to the seperate databases. The results of the two seperate queries are stiched toghether by the BI Server and presented in Answers.
    Cheers,
    Daan Bakboord
    http://obibb.wordpress.com

  • Join line to define object

    Hi,
    i'm trying to create a rope under Illustrator CS5.
    for that i created the usual "S" line and multiply it in order to create the rope effect.
    now i would like to join 2 "S" line together to create a new shape in which i can fill with a color. In that way i will be able to create an alternated colored rope.
    however i have some problem to join 2 "S" line in order to create the shape to fill.
    Do you have an idea on the best method to do that ?
    thx.

    what Jetalmage wrote set the filling color at the beginning and you can't change it later on...you have to recreate a new rope from the coloring step...
    Can't understand what you're saying here. For clarity: When you create a Brush, the dialog provides a Colorization option. Using that feature allows you to change the color of a Brush Effect at the object level any time you want. So you can use one Brush to create ropes (wires, whatever) of any color. For example, note that the artwork of the Brushes shown below are all built in grayscale. The color of the individual wire insulations is applied at the object level, as you would for any ordinary stroke. Thus, the two Brushes that are applied to path 4 can be used to make a wire of any maincolor/tracecolor combination. The colorization options are described in online Help, and are even illustrated in the Brush Options dialog itself.
    So no, you do not have to create a separate Brush for each color rope (if that's what you are saying).
    Regarding joining paths: Join now works without having to "direct select" endpoints with the white pointer. You can just select the paths you want to join, and the Join command will join them at their nearest endpoints. You can override this by selecting the endpoints you want to join when they are not the nearest pair.
    JET

  • Best way to merge 2 different networks/companies in same building

    I would like to get some thoughts on best practice regarding joining 2 different networks in the same building.  2 different companys 2 different networks, we are merging. Once networks are joined we will trust the windows domains.
    Both networks are using 3750's for core switching. So i would assume running fiber from Company1 core to Company2 core via  trunking and sharing select vlans across the cores would be least expensive and most secure route?
    Other ideas or flaws in the idea I have presented?
    Thanks!

    Other than the usual subnet and routing issues, stringing trunk fiber between the switches sounds good.
    If there are multiple firewalls and ISP's involved, you'll have to pay close attention to the routing topology, or reengineer to reduce the complexity.
    If there is overlap in subnet usage, you might want to renumber one side.  Using NAT internally will be an ongoing maintenance headache.
    -- Jim Leinweber, WI State Lab of Hygiene

  • Incremental export of EUL??

    Hi there..
    Currently I'm working on Discoverer to OBIEE migration. I've never worked in Discoverer before.
    Is it possible to export one large EUL to multiple eex files?
    In my case I've just one Businees Area but the size is pretty big and I want to do incremental export.
    How do I do it? and what is the best practice (regarding Joins) in this case.
    Appreciate your help

    Just to be picky here, there actually is a way to export an EUL to multiple .eex files. In the Export Wizard, step 1, you are asked what you want to export. You can export the entire end user layer, selected business areas, or selected objects in the EUL. If you pick the last option (selected objects), then you could do a separate export for each object type. Now is that a realistic choice, especially for an OBIEE migration? Probably not, but it is a choice. Normally this is done for Workbooks. Joins are not a selectable object type, for example. If you pick folders as your object type, then the joins defined for the selected folder(s) will come with them. If you want to learn more about exporting objects from the EUL, look at the Discoverer Administration User Guide (chapter 4).
    John Dickey

Maybe you are looking for

  • How to use groups as invitees for an event in calendar.

    How can I use a group from contacts as an invitee in calendar?

  • Enterprise manager is shutting down intermittently

    Hi, The Enterprise manager of our production 10.2.0.4 database is shutting down intermittently with the following errors in the "emagent.trc" file; SQL = "OCIServerAttach"... LOGIN = dbsnmp/<PW>@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=c1-hd03)(PORT

  • Duplicate Mail

    Hello, I have an annoying problem that I thought I fixed, but it keeps cropping up for various users. I'll use me as an example, but this happens to at least 3 other people. First thing in the morning I check my POP mail account, my email client will

  • TFIB error logs

    Hi, We are getting TFIB error messeges in our Backbone (C7513) router every one hour.Please find the enclosed logs below and suggest us what might be the problem. Mar 1 00:26:08.451 INDIA: %TFIB-7-SCANSABORTED: TFIB scan not completing. Mar 1 01:26:0

  • Photos of brickwork have strange patterns when displayed in Elements 9 Full Screen

    I have recently photographed several brick buildings (houses, lighthouses etc). When I display some of these in Photoshop Elements 9 using Full Screen (F11) the brickwork has a strange, curved secondary striation pattern across it, rather like an int