How to have a condition with the outer join

Hi, I'd like to know if, inside a report, there's a way to create a condition which include in some way an outer join.
So, I have 2 custom folders:
Tickets with 2 fields: Ticket_id, Inventory_item_id, category_id and iptv_sumptom
Hierarchy with 4 fields: Symptom, Inv_item_id, Category_id and Group
These 2 folders are joined in this way
Tickets.inventory_item_id = Hierarchy.inv_item_id (+) AND Tickets.category_id = Hierarchy.category_id (+) AND Tickets.iptv_sumptom = Hierarchy.Symptom (+)
Now, from the report I have a parameter based on the field Group to restrict dataset of the tickets.
...but when I choose a group and I run the report, the conditions inside the plsql query generated is like this
WHERE (Tickets.inventory_item_id = Hierarchy.inv_item_id (+) AND Tickets.category_id = Hierarchy.category_id (+) AND Tickets.iptv_sumptom = Hierarchy.Symptom (+)) AND Hierarchy.Group = 'A'
where the last condition is WITHOUT outer join !
I need to have also the outer join on the Hierarchy.Group: AND Hierarchy.Group (+) = 'A', but from the Administrator I don't want to add another join with (+) for the Group. From Plus I didn't find any way to write (+).....
Anybody knows another method or workaround to have also a filter (the condition Hierarchy.Group = 'A') with an outer join ?
Thanks in advance
Alex

Hi,
A workaround can be either use new objects or modify the existing ones to avoid the outer join.
In order to do that you can add a dummy record to each custom folder and then join by it.
For example if you will add to the
Tickets will be:
select Ticket_id, Inventory_item_id, category_id, iptv_sumptom
from......
union all
select -1,-1,-1,'Some value' from dual
And hierarchy will be:
select Symptom, Inv_item_id, Category_id ,Group
from......
union all
select 'Some value',-1,-1,'Some value' from dual
Now you can create a full join between them without the need to outer join.
Hope it will help
Tamir

Similar Messages

  • How to avoid duplicated rows using the outer join

    Hi everybody,
    I have the following query:
    select a.usr_login, b.ugp_rolename, b.ugp_display_name from
    (select usr.usr_login, usr.usr_key, usg.ugp_key from usr,usg
    where usg.usr_key = usr.usr_key
    and usr.usr_login IN ('C01015','C01208')) a,
    (select ugp.ugp_key, ugp.ugp_display_name from ugp
    where ugp.ugp_rolename LIKE 'B-%') b
    where a.ugp_key = b.ugp_key (+)
    The first query 'a' has the following result:
    usr_login <space> usr_key <space> ugp_key
    C01015 <space> 49 <space> 565
    C01015 <space> 49 <space> 683
    C01015 <space> 49 <space> 685
    C01015 <space> 49 <space> 3
    C01208 <space> 257 <space> 3
    The usr_login on table usr is the primary key, and as you can see above, for each usr_login I can find one ore more ugp_key on the table usg.
    The query 'b' gives the list of all the usr_login's roles which have the name LIKE 'B-%' (it means '*Business Roles*'), and all the respective role's key (ugp_key)
    So, when I join the query 'a' with the query 'b', I expect to find for every usr_login the respective ugp_display_name (the Business Role name).
    Because the query 'b' contains ONLY the ugp_keys of the Business Roles, when I execute the complete query, this is the result:
    usr_login <space> ugp_rolename <space> ugp_display_name
    C01015 <space> BK005 <space> TELLER 1
    C01015 <space> BK003 <space> TELLER 2
    C01015 <space> null <space> null
    C01015 <space> null <space> null
    C01208 <space> null <space> null
    As you can see, with the outer join I obtain the Business Name (ugp_display_name) for each occurrence (and I have 2 rows duplicated with 'null' for the usr_login C01015); This beacuse the query 'b' doesn't have the two ugp_keys 685 and 3.
    Instead I'd like to have the following result:
    usr_login <space> ugp_rolename <space> ugp_display_name
    C01015 <space> BK005 <space> TELLER 1
    C01015 <space> BK003 <space> TELLER 2
    C01208 <space> null <space> null
    deleting ONLY the duplicated rows with null, when the usr_login has already at least one ugp_display_name not null.
    For example:
    1) The usr_login 'C01015' has 2 Business Roles (with ugp_key = 565 and 683) and other 2 not-Business Roles (with ugp_key = 685 and 3) --> I want to see ONLY the 2 records related to the Business Roles
    2) The usr_login 'C01208' has only one not-Business Roles (with ugp_key = 3) --> I want to see the record related to the not- Business Role
    Practically:
    1) When a usr_login has one or more Business Roles and other not-Business Roles , I'd like to see ONLY the records about the Business Roles (not the records with 'null','null')
    2) When a usr_login doesn't have Business Roles, I'd like to see the records about the same usr_login with 'null','null'
    This, because I need to show both usr_logins: with and without Business Roles.
    Anybody has any suggestions ? Any help will be appreciated.
    Thanks in advance for any help !!
    Alex

    Hi, Alex,
    So you want to display rows from a where either
    (1) the row has a match in b, or
    (2) no iwith the same usr_login has a match.
    Here's one way to do that:
    WITH     a     AS
         SELECT  usr.usr_login, usr.usr_key, usg.ugp_key
         FROM      usr
         ,     usg
         WHERE      usg.usr_key     = usr.usr_key
         AND     usr.usr_login     IN ('C01015','C01208')
    ,     b     AS
         SELECT  ugp.ugp_key, ugp.ugp_display_name
         FROM      ugp
         WHERE     ugp.ugp_rolename     LIKE 'B-%'
    ,     got_match_cnt     AS
         SELECT     a.usr_login, b.ugp_rolename, b.ugp_display_name
         ,     b.ugp_key
         ,     COUNT (b.ugp_key) OVER (PARTITION BY  a.usr_login)     AS match_cnt
         FROM      a
         ,     b
         WHERE     a.ugp_key     = b.ugp_key (+)
    SELECT     usr_login, ugp_rolename, ugp_display_name
    FROM     got_match_cnt
    WHERE     ugp_key          IS NOT NULL     -- Condition (1)
    OR     match_cnt     = 0              -- Condition (2)
    ;If b.ugp_rolename or b.ugp_display_name can not be NULL, then you could use that just as well as b.ugp_key for testing condition (1).
    By the way, you don't need sub-queries for a and b; you can do all the joins and all the filtering (except conditions (1) and (2)) in one query, but the sub-queries aren't hurting anything. If you find the separate sub-queries easier to understand, debug and maintain, then, by all means, keep them.
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables, and also post the results you want from that data.
    Explain, using specific examples, how you get those results from that data.
    Always say which version of Oracle you're using.

  • How do I find missing entries in outer join table?

    Hi all,
    I am trying to find records in table1 that are missing in table2.  This is a simple process in SQL, but ABAP is giving me trouble.  I want to do this using an outer join.
    Example:
    Select table1~docnumber
    From table1
    Left Outer Join table2
    On table1docnumber = table2docnumber
    Where table2~docnumber IS NULL.  (the record is missing in table2)
    Note: ABAP gives an error and wants me to use the Having Clause, which is ok, but then ABAP wants me to use Group By, which ok, but then I still get the same syntex error.
    Any thoughts on doing this with the outer join and is null options.  I do not want to select into two internal tables and compare them.

    All,
    I am not trying to do a subquery.  Just a simple outer join where I know some records are missing in the second table.
    Here is the code:
    select eban~banfn
    into table i_delay_banfn
    from eban
    left outer join zsmt_prdelay_upd
    on eban~banfn = zsmt_prdelay_upd~banfn
    where zsmt_prdelay_upd~banfn IS NULL.
    Here is the error message:
    No fields from the right-hand table of a LEFT OUTER JOIN may appear in
    the WHERE condition: "ZSMT_PRDELAY_UPD~BANFN".
    select eban~banfn
    into table i_delay_banfn
    from eban
    left outer join zsmt_prdelay_upd
    on eban~banfn = zsmt_prdelay_upd~banfn
    having zsmt_prdelay_upd~banfn IS NULL.
    Please use code tags
    Edited by: Rob Burbank on Mar 5, 2009 12:20 PM

  • I have a problem with the external sound of my ipod, when I take the headphones the music keeps playing and the ipod recognizes still have a headset connected. how do I get external sound out?

    I have a problem with the external sound of my iPod, when I take the headphones the music keeps playing and the ipod recognizes still have a headset connected. how do I get external sound out?

    - Try insering and removing the headphone plug a dozen times or so.
    - Try cleaning out the headphone jack in the iPod.
    - Resett he iPod. Nothing is lost
    Reset iPod touch: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Restore from backup
    - Restoe to factory defaults/new iPod
    If yu still have the problem that indicates a hardware problem, likely a bad headphone jack. Yu can make an appointment at the Genius Bar of an Apple store to confirm.
    If not underwarranty Apple will only exchange your iPod for a refurbished one for:
    Apple - Support - iPod - Repair pricing
    A third-party place like the following is less expensive. Here is one. Google for more.
    iPhone Repair, Service & Parts: iPod Touch, iPad, MacBook Pro Screens

  • I have 2 iphone with the same apple id. Now I want to use a different apple id for the iphones. How to do it? Help . Thank you!

    I have 2 iphone with the same apple id. Now I want to use a different apple id for the iphones. How to do it? Help . Thank you!

    Create a new Apple ID using a new valid e-mail address
    https://appleid.apple.com/cgi-bin/WebObjects/MyAppleId.woa/
    In iPhone's Settings > Store > Apple ID > Sign Out and sign in the new.

  • How do I delete files on my iPod second gen?  This is a NEW problem I have only had with the latest version of iTunes.  I have not changed libraries.

    How do I delete files on my iPod second gen?  This is a NEW problem I have only had with the latest version of iTunes.  I have not changed libraries.  All files are grayed out.  I have already read related posts in the iTunes community.

    Thanks but I had already read this, and it was no help at all.  Under the Summary tab, "Options", there is no check-box to manually manage my stuff.  I suspect this is because it is a 2nd gen iPod, with ONLY manual management.  The only way to delete my stuff seems to be to reset the entire device.
    I like to listen to podcasts.  What is particularly frustrating is that the 4th gen shuffle CANNOT play podcasts, but ONLY music, which I discovered after a lot of research and multiple visits to an Apple store.  So I have to resort to an older version of the shuffle to play podcasts  And now with the latest version of iTunes there seems to be no way to delete any podcasts on the older version.  Apple just makes it harder and harder for us podcast-lovers, driving us away from Apple -- driving me away from the entire brand and from ALL Apple devices, not just iPod.

  • ITunes 11... I have multiple artists with the same album name... how do i have them show up as separate albums?

    I have itunes 11 with iTunes Match on 2 Macs and 2 ios devices... I know it all has bugs... but I have been ok.
    I am wondering how to show my library in the column browser view when I have multiple albums with the same names? I have noticed on my ipod in my car that an album titled "Christmas" plays and includes 2 different albums titled christmas... and in itunes it lists them both when not in the artwork view... (I primarily use the column browser to navigate my library.
    Just wondering if anyone else has experienced this/knows how to fix.
    Thanks!

    Various workarounds I can think of which basically involve playing around with tags.  See which meets your needs or come up with others:
    Give the albums slightly different names.  For example, "Greatest Hits" [ABBA]"
    Do the same but do it in the sort album field.
    Add a bogus disc number to different albums.  It may string them together still but at least they will be slightly grouped.

  • HT3310 i have a problem with the headset of my ipod nano 4th gen. the right side don't have a sound. It comes in and out.  what do I need to do?.. I am using the original headset eversince. I took it to an Apple Mac Center I was told they can't do anythin

      I have a problem with the headset of my ipod nano 4th gen. the right side don't have a sound. It comes in and out.  what do I need to do.. I am using the original headset eversince. I tool it to a Apple Mac Cennter and Taked with a Service Center Rep. And he told me that they can't do anything because they don't repair the ipod they didn;t even look at it. I was told instead to buy a new one. I was very disappointed.. This is already my 5th ipod though i am planning to buy a new one.. I still want it fixed so I can give it to my little sister

    From the OP: "My old computer got a virus and when that happened all my music was lost. "
    They don't have the music on their computer so they cannot transfer the iTunes folder, from the computer to their iPod and then to the new computer. And if they try to enable disk use on the iPod it will erase all the music that is on it. The method you cited is moving the files in a data format using the iPod as a flash drive. It doesn't work if they are in music format. That is why I suggested Yamipod.

  • HT201269 I had an old PowerMac and now i have the MacBook Pro.  I am not use to the new iTunes.  I use to be able to drag music that I had added onto my computer from a CD to my iPhone or iTouch.  How do I do that with the new iTunes?

    I have CDs that I want to import onto my new MacBook Pro to my iPhone.  I am not use to the new iTunes with the Mountain Lion software.  I had an old PowerMac that had the Leopard software and I was able to drag those songs to my iPhone.  I can't find that option.  When I find the song I want to add to my iPhone, I tried dragging it to the top when it shows that my iPhone is connected with iTunes.  Or how do i do this with the Cloud?  I am new to that as well.  Seems like it just held my purchased songs from iTunes.

    iCloud only has content purchased (or free) from iTunes. Ripped music or music from other sources is only on your computer. As the iPhone can only sync with one computer at a time you should copy the iTunes folder from the old computer to the new one. It's in the Music folder on the old one, just copy the entire folder to the Music on the new computer. When you first sync your iPhone content will be replaced by the content of the new computer.
    You can optionally enable iTunes Match. This searches the non-iTunes content in iTunes or on your iPhone and finds the original digital version on the Internet if it exists. This then becomes your backup. If you have music that it cannot find it will upload it to your cloud storage, but you may have to pay for the storage if it is over 5 GB total (along with your backup). iTunes content and Match content are not included in the 5 GB free limit.
    Usually to fix mail issues just delete the account, reset (reboot) the phone by holding HOME and SLEEP until an Apple logo appears, and adding the email account(s) back.

  • I have a macbook pro from 2009 and the software is 10.5.8 how do i update it so i can have more interaction with the applications

    i have a macbook pro from 2009 and the software is 10.5.8 how do i update it so i can have more interaction with the applications

    Note some programs may not work with Lion or later
    Upgrading to 10.7 and above, don't forget Rosetta!

  • I updated my ipod and it deleted my entire library how do I restore it with the backup I have saved?

    I updated my ipod and it deleted my entire library.  How do I restore it with the backup I have so all songs will be available in the cloud; which I paid extra Money to increase memory for?

    The backup that iTunes makes does not include apps, music, synced videos and photos. Se:
    iTunes: About iOS backups
    You will have to sync the items back form yur computer/iTunes library to the iPod via iTunes. If they are not on the computer you can redownloa d some iTunes purchases by:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store

  • How do I save a PDF ready for print. I have a problem with the fonts. The fonts are blurry after pri

    How do I save a PDF ready for print. I have a problem with the fonts. The fonts are blurry after printing. There is a trick in saving PDF.

    Hi el_giclee,
    Important to note from the beginning is that when you create your Photoshop document make sure you chose 300 Pixels/inch as your resolution.
    I'm interested in seeing your Save Adobe PDF dialog box after you choose to save the PDF.
    Could you post a screenshot of this dialog box with the Compression menu selected on the left side?
    It's a good idea to select High Quality Print or Press Quality in the Adobe PDF Preset menu at the top of this box. It will automatically select the best default settings for a printed piece.
    Michael

  • I have a problem with the mac can not read video files with the extension IMOD. How can I solve this problem?

    I have a problem with the mac can not read video files with the extension IMOD. How can I solve this problem?

    By doing a Google search. 

  • TS3682 i have upgraded ipad with the latest version of ios. However, while restoring backup from itunes to ipad, a password is being asked. i do not have password, how to go about?

    i have upgraded ipad with the latest version of ios. However, while restoring backup from itunes to ipad, a password is being asked. i do not have password, how to go about?

    Restore from iCloud Backup
    1. Erase all contents and settings (Settings>General>Reset>Erase all content and settings)
    2. You'll be asked twice to confirm
    3. You'll see Apple logo and progress bar
    4. You'll see a big iPad logo on screen
    5. Configuration start
    6. Set language
    7. Set country
    8. Enable Location Service
    9. Select network, enter password and join network
    10. You'll be given 3 options (a) Setup as New iPad (b) Restore from iCloud Backup (c) Restore from iTune Backup
    11. Selected Restore from iCloud Backup

  • I have a rectangle with the word caption written twice on it which appears on my page and obscures my information - how can I get rid of this please?

    I have a rectangle with the word 'caption' written twice on it which appears on my page and obscures my information. How can I get rid of it please?

    Can you post the URL so we can test the page and look at its code?

Maybe you are looking for

  • Idoc to file scenario general query

    Hi All, I know about the basic settings needed for the Idoc to file scenario. My query is related the idoc /ALE settings. I have a scenatio wrking in my system where we have configured the port for B type partner and also the port as XML-HTTP I can n

  • Footnotes at the bottom of the page

    For anyone interested – putting the above title in the search window didn't produce anything I mean. And I welcome better ideas. I work with a Dutch language version, so I hope I use the right terms. Working on juridical textbooks with hundreds of so

  • Enable rsync server with smf

    Hi all !! I want to install a rsync server witn solaris 10, and can't configure smf to start the server. I have the old inetd.conf lines: rsync stream tcp nowait root /usr/bin/rsync rsyncd --daemon Can someone explain how I can to migrate this line t

  • I would like to open a file .eml in Firefox, and open in Internet Explorer

    I open Firefox, i say "open" a file .eml and what it is to open Internet Explorer. How can i turn that?

  • IView size in Web Page Composer

    Hi all, I have created one page using Web Page Composer. I have designed some forms using XML form builder and created KM navigation iView. If I assigned that iView to page , it takes full height. How can we fixed the height of the iView and what sho