Testing for IS NOT NULL with left join tables

Dear Experts,
The query is showing the NULL rows in the query below....
Any ideas, advice please? tx, sandra
This is the sql inspector:
SELECT O100321.FULL_NAME_LFMI, O100321.ID, O100404.ID, O100321.ID_SOURCE
, O100404.NAME, O100321.PERSON_UID, O100404.PERSON_UID, O100404.VISA_TYPE
FROM ODSMGR.PERSON O100321
, ODSMGR.VISA O100404
WHERE ( ( O100321.PERSON_UID = O100404.PERSON_UID(+) ) ) AND ( O100404.VISA_TYPE(+) IS NOT NULL )

Hi Everyone,
I am understanding alot of what Michael and Rod wrote.... I am just puzzled over the following:
the query below is left joining the STUDENT table to
HOLD table.
The HOLD table - contains rows for students who have holds on their record.
a student can have more than one hold (health, HIPAA, basic life saving course)
BUT, for this query: I'm only interested that a hold exists, so I'm choosing MAX on hold desc.
Selecting a MAX, helps me, bec. it reduces my join to a 1 to 1 relationship, instead of
1 to many relationship.
Before I posted this thread at all, the LEFT JOIN below testing for IS NOT NULL worked w/o
me having to code IS NOT NULL twice....
Is that because, what's happening "behind the scenes" is that a temporary table containing all max rows is being
created, for which Discoverer has no predefined join instructions, so it's letting me do a LEFT JOIN and have
the IS NOT NULL condition.
I would so appreciate clarification. I have a meeting on Tues, for which I have to explain LEFT JOINS to the user
and how they should create a query. I need to come up with rules.
If I feel "clear", I asked my boss to buy Camtasia videocast software to create a training clip for user to follow.
Also, if any Banner user would like me to email the DIS query to run on their machine, I would be glad to do so.
thx sooo much, Sandra
SELECT O100384.ACADEMIC_PERIOD, O100255.ID, O100384.ID, O100255.NAME, O100384.NAME, O100255.PERSON_UID, O100384.PERSON_UID, MAX(O100255.HOLD_DESC)
FROM ODSMGR.HOLD O100255, ODSMGR.STUDENT O100384
WHERE ( ( O100384.PERSON_UID = O100255.PERSON_UID(+) ) ) AND ( O100384.ACADEMIC_PERIOD = '200820' )
GROUP BY O100384.ACADEMIC_PERIOD, O100255.ID, O100384.ID, O100255.NAME, O100384.NAME, O100255.PERSON_UID, O100384.PERSON_UID
HAVING ( ( MAX(O100255.HOLD_DESC(+)) ) IS NOT NULL )
ORDER BY O100384.NAME ASC

Similar Messages

  • 3 tables with left joins - bug?

    Hello,
    i am making query where i encounter problem with left join in oracle. I am using oracle 10g and i prepare simple test case.
    he is testing tables and datas - really simple i think:
    drop table t1;
    drop table t2;
    drop table t3;
    create table t1 (a number not null);
    create table t2 (a number, b number);
    create table t3 (b number);
    insert into t3 values (1);
    insert into t3 values (2);
    insert into t3 values (3);
    insert into t1 (a) values (1);
    insert into t2 (a,b) values (1,1);
    insert into t1 (a) values (2);
    insert into t2 (a,b) values (2, null);
    insert into t1 (a) values (3);
    insert into t1 (a) values (4);
    insert into t2 (a,b) values (4,1);
    insert into t1 (a) values (5);
    insert into t2 (a,b) values (5,3);
    and now query with left joins:
    select
    t1.a
    , t2.a, t2.b
    , t3.b
    from
    t1, t2, t3
    where
    t1.a = t2.a (+)
    and t2.b = t3.b (+)
    and t3.b is null
    order by t1.a
    i get two rows as result:
    A A_1 B B_1
    2 2 null null      
    3 null null null                
    i expect these rows but when i change my query - i dont want get back t3.b column:
    select
    t1.a
    , t2.a, t2.b
    /* , t3.b*/
    from
    t1, t2, t3
    where
    t1.a = t2.a (+)
    and t2.b = t3.b (+)
    and t3.b is null
    order by t1.a
    i get only one row
    A A_1 B
    2 2 null
    My question is simple how can i only by changing columns getting back change number of returned rows? I must say i dont expect these result i expect two rows again.
    Thanks for help.

    BluShadow wrote:
    I think I know what you are getting at.
    By testing for null on t3.b when you aren't selecting the column, you are enforcing oracle to perform the join through t2 onto t1, but Oracle can't join because t2 has no matching row (although it's outer joined to t1) and therefore, for the one row it can't actually determine if t3.b is null or not, so that row can't match the conditions in a "true" sense and be displayed. If you select the column then oracle can test its nullness ok. (Perhaps this is a bug, I don't know, it's just how I know it works)If you get different results only by changing the projection part of the query this is a bug and nothing else. I can't reproduce using Oracle 10g XE, I get in both cases shown the expected two rows.
    What versions are you using to test this?
    SQL>
    SQL> select * from v$version
      2  where rownum <= 1;
    BANNER
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
    SQL>
    SQL> drop table t1 purge;
    Table dropped.
    SQL> drop table t2 purge;
    Table dropped.
    SQL> drop table t3 purge;
    Table dropped.
    SQL>
    SQL> create table t1 (a number not null);
    Table created.
    SQL> create table t2 (a number, b number);
    Table created.
    SQL> create table t3 (b number);
    Table created.
    SQL>
    SQL> insert into t3 values (1);
    1 row created.
    SQL> insert into t3 values (2);
    1 row created.
    SQL> insert into t3 values (3);
    1 row created.
    SQL>
    SQL> insert into t1 (a) values (1);
    1 row created.
    SQL> insert into t2 (a,b) values (1,1);
    1 row created.
    SQL>
    SQL> insert into t1 (a) values (2);
    1 row created.
    SQL> insert into t2 (a,b) values (2, null);
    1 row created.
    SQL>
    SQL> insert into t1 (a) values (3);
    1 row created.
    SQL>
    SQL> insert into t1 (a) values (4);
    1 row created.
    SQL> insert into t2 (a,b) values (4,1);
    1 row created.
    SQL>
    SQL> insert into t1 (a) values (5);
    1 row created.
    SQL> insert into t2 (a,b) values (5,3);
    1 row created.
    SQL>
    SQL> commit;
    Commit complete.
    SQL>
    SQL> select t1.a
      2       , t2.a, t2.b
      3       , t3.b
      4  from
      5         t1 left outer join t2 on (t1.a = t2.a)
      6            left outer join t3 on (t2.b = t3.b)
      7  where t3.b is null
      8  order by t1.a;
             A          A          B          B
             2          2
             3
    SQL>
    SQL> select t1.a
      2       , t2.a, t2.b
      3  --     , t3.b
      4  from
      5         t1 left outer join t2 on (t1.a = t2.a)
      6            left outer join t3 on (t2.b = t3.b)
      7  where t3.b is null
      8  order by t1.a;
             A          A          B
             2          2
             3
    SQL>Regards,
    Randolf
    Oracle related stuff blog:
    http://oracle-randolf.blogspot.com/
    SQLTools++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676/
    http://sourceforge.net/projects/sqlt-pp/

  • Looking for a free app for secure note taking with search feature (unlimited)

    Hi dudes,
    As the topic suggests, I'm looking for a free app for secure note taking with search feature without any restriction on the number of notes or any other major restriction. I already use HiDisk (which lacks search feature), and security note+ (which has limitation on the number of notes). I also have used My Disk which its search feature doesn't work correctly (it's buggy).
    Thank you.

    One named NotePad is free, saves as .txt files.
    Another, WriterRoom, costs $1.99USD, and saves as .txt and .doc files.
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!
    3. Install free BlackBerry Protect today for backups of contacts and data.
    4. Guide to Unlocking your BlackBerry & Unlock Codes
    Join our BBM Channels (Beta)
    BlackBerry Support Forums Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • HT2488 Is there a way to highlight a lot of folders at the same time to replace underscore between the title words with a space? If it's possible can someone please explain in easy to follow steps for somebody not good with the mac .. Thanks

    Is there a way to replace, on a list of folders at the same time, underscore between title words on a folder with a space? If someone has the know how could they please explain in real simple to follow way for somebody not good with Mac .... Thanks

    You need a "bulk renamer" to do this.
    I personally use ABetterFinderRename, but there are cheaper and some that are free. ABFR has a free trial.
    Renamer4Mac is cheap. Check the App Store too.

  • One-to-Many implemented with a join Table

    Hello,
    Is it possible to implement a One-to-Many relationship with a join table, just like
    the Reference Implementation does.
    Regards,
    Jeroen

    "Jeroen Ferdinandus" <[email protected]> wrote in
    news:[email protected]:
    Is it possible to implement a One-to-Many relationship with a join
    table, just like the Reference Implementation does.Not with our CMP, you will have to resort to BMP for that.
    Cedric

  • How can I pass multiple condition in where clause with the join table?

    Hi:
    I need to collect several inputs at run time, and query the record according to the input.
    How can I pass multiple conditions in where clause with the join table?
    Thanks in advance for any help.
    Regards,
    TD

    If you are using SQL-Plus or Reports you can use lexical parameters like:
    SELECT * FROM emp &condition;
    When you run the query it will ask for value of condition and you can enter what every you want. Here is a really fun query:
    SELECT &columns FROM &tables &condition;
    But if you are using Forms. Then you have to change the condition by SET_BLOCK_PROPERTY.
    Best of luck!

  • After REFRESH the cached object is not consistent with the database table

    After REFRESH, the cached object is not consistent with the database table. Why?
    I created a JDBC connection with the Oracle database (HR schema) using JDeveloper(10.1.3) and then I created an offline database (HR schema)
    in JDeveloper from the existing database tables (HR schema). Then I made some updates to the JOBS database table using SQL*Plus.
    Then I returned to the JDeveloper tool and refreshed the HR connection. But I found no any changes made to the offline database table JOBS in
    JDeveloper.
    How to make the JDeveloper's offline tables to be synchronized with the underling database tables?

    qkc,
    Once you create an offline table, it's just a copy of a table definition as of the point in time you brought it in from the database. Refreshing the connection, as you describe it, just refreshes the database browser, and not any offline objects. If you want to syncrhnonize the offline table, right-click the offline table and choose "Generate or Reconcile Objects" to reconcile the object to the database. I just tried this in 10.1.3.3 (not the latest 10.1.3, I know), and it works properly.
    John

  • How can L identify what are the not null fields of a table in a stored procedure ?

    How can L identify what are the not null fields of a table in a stored procedure ?

    You could query the data dictionary:
    SELECT column_name
    FROM all_tab_columns
    WHERE owner = '...'
    AND table_name = '...'
    AND nullable = 'N'

  • MyDAQ fails Self-Test and will not work with any software

    I cannot get the myDAQ to communicate properly. I did everything I could to make sure that the device was detected by the computer. It shows up in Device Manager under Data Acquistition Devices as NI myDAQ and in NI MAX as "myDAQ1", but I receive errors when trying to use it with any NI program.
    Trying to self-test or reset the device in MAX gives these errors:
    -The self test failed. -88705 The specified device is not present or is not active in the system. The device may not be installed on this system, may have been unplugged, or may not be installed correctly.
    -There was a problem resetting the device. Error code: 80040383.
    It also gives this error when trying to use the Elvis Oscilloscope:
    -Error -200324 occurred at ELVISmx_DAQmx Create Channel (AI-Voltage-Basic).vi:1 
    Possible reason(s):
    NI-DAQmx is unable to communicate with the device. Make sure the device is present in and accessible to the system, is not currently being reset, and is not reserved by another driver such as Traditional NI-DAQ (Legacy).
    I have uninstalled and reinstalled and repaired all installed NI products twice. I updated to NI-DAQmx 9.8.0 and am using NI Elvis 4.5. I have checked  NI Device Loader and mDNS Responder Service in Services and everything is running properly. I have also tried Reset Configuration Data in NI MAX several times. I turned Fast Startup off as suggested in one article. I have tried plugging it into every single USB port on my computer; all 8 of them. The blue led is on when plugged in, but I cannot figure out why it will not work with any of the software. I am running Windows 8 Pro 64-bit. Also, it completely works on the school computers running Windows 7 without any problems. I would like to have it functioning with all the NI software purchased, but all I want to do is use the oscilloscope software for now. It has honestly been way too much work and a huge loss of time for something that should work out of the box. Please help me resolve this, thanks.
    Attachments:
    ni_support.zip ‏341 KB

    Hi chaka123,
    I had already read that article so it wasn't anything I hadn't tried. I did, however, uninstall both NI DAQmx and NI ELVISmx, ran the registry cleaner and then plugged my device in. Now it shows up as USB Flash Firmware Updater. This is actually what it showed the first time I plugged this in out of the box. After much troubleshooting I was finally able to get it to at least recognize it as a myDAQ. This is problem I know others have had.
    To answer your questions:
    Does the Test Panels work at all?
    I am not sure, I didn't try it before uninstalling. Now the Test Panels isn't an option because it is recognized as the Flash Firmware Updater.
    Have you tried to delete the device in MAX?
    Once again, I cannot because it shows up as Flash Firmware Updater.
    Which is the color of the icon on the left side of “myDAQ1”?
    It was green before the uninstall. Now it shows the USB symbol.
    I tried deleting the driver. When I plugged the device back it, Windows started automatically trying to load a driver for it. Now it shows as NI myDAQ with a yellow exclamation symbol. In MAX it shows as NI myDAQ with a USB symbol. Under Driver Details it says "Windows does not have a driver associated with your device." 
    What folder can I manually point Device Manager to in order to load the correct driver?
    Attachments:
    devicemanager.PNG ‏40 KB

  • Java Webconsole ELResolvers for JSR not registered with the JSP container

    Trying to rebuild a LDAP server running Directory Server 6.1. Just installed Solaris 10 u9 on a SunFire V240. Loaded most recent recommended patch set dated 2011.02.02. Proceeded to load Directory Server V6.0 from native packages using JAVA ES Installer. After Directory Server installation and initialization the Java Webconsole is running but brings up a blank page login page. Note: Did not test the Webconsole prior to Directory Server installation. The errors in the /var/log/webconsole/console/console_debug_log file state:
    Feb 8, 2011 10:32:32 AM com.sun.faces.lifecycle.ELResolverInitPhaseListener populateFacesELResolverForJsp
    INFO: JSF1027: [console] The ELResolvers for JSF were not registered with the JSP container.
    Feb 8, 2011 10:32:34 AM com.sun.faces.lifecycle.Phase doPhase
    SEVERE: JSF1054: (Phase ID: RENDER_RESPONSE 6, View ID: /jsp/login/BeginLogin.jsp) Exception thrown during phase execution: javax.faces.event.PhaseEvent[source=com.sun.faces.lifecycle.LifecycleImpl@13c3b45]
    The JAVA version is: 1.6.0_22
    The cacao version is 2.2.4.1
    Kernel Patch is Generic_144488-06
    Anyone have an idea what is causing this problem for the JAVA webconsole and how to fix it?

    hi,
    it is tomcat-6.0.20, JSF-RI 2.0.2 (Mojarra)
    a whole bunch of libs and jquery4jsf (though really buggy in this manner, because all components could you rewrite for JSF2-components, etc.)
    Unfortunately it is somehow a config error, because i haven't got it earlier, since i changed PhaseListener and Authentification with JAAS (sample from Ed Burns:
    http://weblogs.java.net/blog/2006/03/07/repost-using-jaas-jsf, but with JDBC-based authentification)
    cheers,
    Istvan

  • Why does for-each not work with Enumeration?

    I'm sure there's some reason for this but I don't know what it would be.
    I am calling an existing method [http://java.sun.com/javase/6/docs/api/java/util/zip/ZipFile.html#entries()] And it returns Enumeration<? extends ZipEntry>
    What I would like to do is
    Enumeration<? extends ZipEntry> entries = myzipfile.entries();
    for(ZipEntry ze : entries)but this won't compile because Enumeration is not an Iterator. Which kinda sucks.
    Obviously (I think) Enumeration can't be retrofit to be an Iterator without problems and the APIs that return Enumeration can't change without problems so it seems the only way that for-each would work with an Enumeration is if for-each was allowed to work with Iterator and Enumeration.
    So my question is, why isn't it? (To be clear I know how to enumerate an Enumeration, I'd just like to know if anybody has a clue why for-each was not designed to support Enumeration)

    Still it does'nt fully answer the why question. Why does the Collections class not implement a static iterable(Enumeration) method that does not impose the overhead of an addiditional ArrayList, as in the following class:
    import java.util.Collections;
    import java.util.Enumeration;
    import java.util.Iterator;
    import java.util.zip.ZipEntry;
    import java.util.zip.ZipFile;
    public class EnumerationToIterable {
        public static <T> Iterable<T> iterable(final Enumeration<T> enumeration) {
         return new Iterable<T>() {
             @Override
             public Iterator<T> iterator() {
              return new Iterator<T>() {
                  @Override
                  public boolean hasNext() {
                   return enumeration.hasMoreElements();
                  @Override
                  public T next() {
                   return enumeration.nextElement();
                  @Override
                  public void remove() {
                   throw new UnsupportedOperationException();
        public void iterateOne(ZipFile myzipfile) {
         Enumeration<? extends ZipEntry> entries = myzipfile.entries();
         for (ZipEntry ze : Collections.list(entries)) {
             // process ze
        public void iterateTwo(ZipFile myzipfile) {
         Enumeration<? extends ZipEntry> entries = myzipfile.entries();
         for (ZipEntry ze : iterable(entries)) {
             // process ze
    }Could it be more simple?
    (Thanks for the Dukes)
    Piet

  • Report EM12C for targets not associated with (Administration) Group

    Is there a report/view in EM12C for showing which targets are not associated with a Administration Group or a standard group?

    For administration groups, check the Unassigned Targets report, accessible from the Associations tab.
    For more details, look for the section "Identifying Targets Not Part of Any Administration Group" in the Administration Groups chapter of the EM 12c Administrator's Guide:
    http://docs.oracle.com/cd/E24628_01/doc.121/e24473/administration_group.htm#EMADM10011

  • Palm Desktop 4.1.4E for is not compatible with Vista ?

    I got Zire 31 and try to sync in Windows Vista using Palm Desktop 4.1.4E for Windows
    I did right click on the setup files and "run as administrator", and after the installation, I click on the icon and run as the administrator to open the program.
    and it pop up this message "Palm Desktop Application has stop working..."
    uninstall and reinstall didn't help.  so would that mean Palm Desktop 4.1.4E for Windows does not work with Windows Vista ????
    I'm having too much trouble with this. please help.
    Thanks
    Post relates to: Zire 31
    Post relates to: Zire 31

    Which version of Vista?  32bit or 64bit?
    Your only solution to sync with 64bit is via the Infra-red (IR) port on your Zire31...
    WyreNut
    Post relates to: Centro (AT&T)
    I am a Volunteer here, not employed by HP.
    You too can become an HP Expert! Details HERE!
    If my post has helped you, click the Kudos Thumbs up!
    If it solved your issue, Click the "Accept as Solution" button so others can benefit from the question you asked!

  • Viewmail for lotus notes - Issue with installation

    Hello there,
    We just did an upgrade from an older version of unity and call manager (4 to 9)
    There unity was tied to lotus notes. 
    We are having an issues configuring the Viewmail for lotus notes client.
    we are using the following installation guide
    http://www.cisco.com/en/US/docs/voice_ip_comm/connection/vmn/release/notes/851cucvmnrn.html
    on theCreating a ViewMail for Notes Account in Notes section
    step 2 (we are using notes 8.5)
    it says from the file menu select open then lotus notes application then Install VMN
    that menu option is not there at all.  Please help
    we have a menu under file then application.  however there is not Install VMN option
    we are on connection 9.1.1a however the issue seems to be with the client not matching up on the install instructions
    thanks

    Please check the below docs . Looks like the EOL for IBM lotus with cisco UC has
    ended a long time back. 
    http://www.cisco.com/en/US/prod/collateral/voicesw/ps6789/ps9830/end_of_life_notice_c51-546834.html
    http://www.cisco.com/en/US/products/sw/voicesw/prod_category_end_of_life.html
    The above is the reason why you probably do not see the install VMN option.
    Hope that helps!
    Regards,
    Karthik Sivaram

  • Office for Mac not working with 10.5.8

    I upgraded to Mac 10.5.8, but neither my 2004 Office for Mac not Acrobat 5.0 are functioning properly. Should I uninstall and reinstall or do I need to upgrade?

    You need Acrobat 7.1
    Is your Office 2004 up to date?

Maybe you are looking for