Compare data and output data that does not exist

Hello,
i wrote a procedure to insert the data into a 3rd table where i compare the data between two tables, if it matches it shouls insert into the test_a table. if the does not exist either one of the tables i.e. test_code and test_type it should output that data where it doesn't exist. my code works for only one table i.e. test_code. its not dbms outputing a row that is not in test_type table. could any tell my why?suppose if test_code a row that is not in test_type it should output saying this row mismatches with test_type and vice versa.
--here is my code
CREATE OR REPLACE PROCEDURE test.GET_data
IS
BEGIN
DELETE test.test_a;
FOR c IN (select a.cCODE ,
a.type,
a.indicator,
rtrim (xmlagg (xmlelement (e, a.codenum || ',' )order by a.codenum).extract ('//text()'), ',') codeNUMber,
b.ccode cc,
b.type tp,
b.indicator ind
from test.test_code a, test.test_type b
where a.ccode = b.ccode(+)
AND a.type = b.type(+)
AND a.indicator = b.indicator(+)
Group by a.ccode, a.type, a.indicator, b.CCODE,b.type, b.indicator
order by a.ccode)
LOOP
BEGIN
IF (c.cCODE = c.CC
AND C.type = C.tp
AND C.indicator = C.ind
AND C.SYS_IND = C.SYSIND) THEN
insert into test.test_a (CCODE, type, indicator)
values (C.cCODE, C.type, C.indicator);
ELSE
dbms_output.put_line('Rules Problem For cCODE: ' || C.cCODE);
     dbms_output.put_line('type: ' || C.type);
     dbms_output.put_line('indicator: ' || C.indicator);
dbms_output.put_line('Rules Problem For CC: ' || C.CC);
dbms_output.put_line('tp: ' || C.tp);
dbms_output.put_line('ind: ' || C.ind);
END IF;
EXCEPTION
WHEN OTHERS THEN
dbms_output.put_line('Rules Problem For cCODE: ' || C.cCODE);
     dbms_output.put_line('type: ' || C.type);
     dbms_output.put_line('indicator: ' || C.indicator);
dbms_output.put_line('Rules Problem For CC: ' || C.CC);
dbms_output.put_line('tp: ' || C.tp);
dbms_output.put_line('ind: ' || C.ind);
END;
end loop;
commit;
END;
Thanks

You need to use a FULL OUTER JOIN instead an OUTER JOIN for that.
Just curious, why do you need to use dbms_output instead of running the SQL query with additional conditions (the if part of your procedure)?. You can use it twice, one to insert the ones that match, and one for selecting the others that do not match.
Regards.

Similar Messages

  • 0SD_C03 cube contains data that does not exist  in PSA

    Hi,
    We have a problem with data difference in cube and PSA. Firstly we deleted PSA extactly then extracted data from r3 to PSA. PSA has 2 records now. Then we extracted data to cube (0SD_C03) via DTP (using 2LIS_13_VDITM transformation rules). However, the cube contains approximately 300 000 data. Cube contains many records that does not exist in PSA.
    Where these data come from?
    thanks in advance,

    Hi,
    In your PSA overview, did you change the date that limits the PSA packages showing?
    (middle top of screen) and click refresh?
    it might be that you only have deleted the PSA from a certain date onwards.
    Success,
    Udo

  • Can a trendline in Numbers be extended to see predictions without adding data that does not exist?

    The spread sheet that I'm working with adds daily data over a 6 month timeframe. The trendline stops at the newest data point. I would like to know what to expect in 6 months so I can make adjustments to adjust progress. I would like to do this without adding false data that I don't have yet.
    Thanks

    If you notice in my first response... the top screenshot shows a plot with a trend line that shows the equation.  I used the slope and offset in the formula that extend the "prediction"
    you could use the forecast() or linest() function to create this prediction with out the trend line.
    Here is another example:
    I entered actual (but made up) data in columns A and B
    then I calculate the slope and intercept of that data in column F
    F3=INDEX(LINEST(B2:B6,A2:A6,TRUE,TRUE), 1)
    F4=INDEX(LINEST(B2:B6,A2:A6,TRUE,TRUE), 2)
    now in columns C and D I enter X values and calculate predicted Y values using the slope and intercepts:
    D2=$F$3×C2+$F$4
    select D2 and fill down as needed

  • P16B Error : Entry pernr date VA does not exist in T5W/G

    Hi
    We are facing an error wherein we are not able to update the salary package details (FBP) using transaction P16B.
    It throws an error saying "Entry <pernr> <date> VA does not exist in T5W/G" before the screen loads.
    On debugging we found the error occurs in HR_SPA_VARIANT_GET function module where it checks for entry in the table T5W7G.
    The entry in the above table is not getting created even if update using P16B_ADMIN.
    The error is getting rectified if we manually create the entry in the table T5W7G and T5W7I for both VA and VB.
    I am unable to find a configuration node for creating the entries in the table's T5W7G and T5W7I .
    Please advice on how this error is to be rectified.

    Hi
    You have to either fix this in configuration through SPRO or If it is not solved through SPRO then you have search for an SAP note.
    Thanks & Regards
    Jyo

  • Business Management Error: You are attempting to create a user with a domain logon that does not exist. Select another domain logon and try again.

    Hello,
    Suddenly the working CRM is being stopped for some group of users.
    I drilled down to the issue and have checked that the users from Domain in which CRM is installed are having CRM access.
    But for other domain user having problem to access CRM.
    I tried to add a user from a domain which is not of CRM domain then it gives following error.
    "Business Management Error: You are attempting to create a user with a domain logon that does not exist. Select another domain logon and try again.
    <Message>LookupAccountNameW failed with error</Message> "
    The change is made - AD group have upgraded Activer Directory server to 2012 R2
    Please help as the Production CRM is not working for other domain user.

    We have Activer Directory Structure like below.
    One Root Domain says A
    and there are multiple child domain like B,C,D etc...
    B,C and D are all in same level,they are child of A domain.
    There are two way transitive trusts between A and all the child Domain.
    But there is no trust in between B and C and so on.
    Our CRM server is in B domain and B domain's user can access CRM but users of Domain C,D and so on can not access CRM.
    If this post answers your question, please click &quot;Mark As Answer&quot; on the post and &quot;Mark as Helpful&quot;

  • Data source does not exist

    Dear all,
    am extracting the data from Vistex datasource,IRM/LIS_RM_IPCRASP               IP CR Agreement Conditions
    after activating in RSA5 i can able to see in RSA6
    but while activating the data source after the extract structure has successfully generated,
    the system showing data source does not exist
    plz help me

    hi,
    when i click the maintain button save button will appear,
    but in my case this save button not highlighting...
    when i check in ST22 the system proposed error mesage is table illegal statement,
    i found this error in many forums but its not related to datasource actvation,
    plz anyone giv me solution as soon as possible...
    regards
    Edited by: gadhatharan thirunavukkarasu on Oct 15, 2011 7:57 AM

  • My IPhone is asking me to type in my password for my old Apple ID that does not exist anymore. I cant set up ICloud without typing in a password to a Apple ID that does not exist, so do I have to remove everything from my IPhone and start over?

    my IPhone is asking me to type in my password for my old Apple ID that does not exist anymore. I cant set up ICloud without typing in a password to a Apple ID that does not exist, so do I have to remove everything from my IPhone and start over?

    Hello miamat2017
    You should see an option to skip that step and then sign out of it when looking in Settings. Check out the article below for more information.
    iOS 7: If you're asked for the password to your previous Apple ID when signing out of iCloud
    http://support.apple.com/kb/ts5223
    Regards,
    -Norm G.

  • Cannot get into iPad, it keeps wanting me to sign in using old email that does not exist, and for a password that she does not remember, so I am unable to change password. How do I get around this?

    Cannot get into old iPad, it keeps wanting me to sign in using old email id that does not exist, and for a password that she does not remember, so I am unable to change password. How do I get around this?

    With iOS 7 Activation lock you can't.
    iCloud: Activation Lock
    http://support.apple.com/kb/PH13695
     Cheers, Tom

  • Hello buy a movie on apple tv, and now can not find the device tells me I should go to settings / downloads / check downloads, but that does not exist in the menu of the apple tv, please help

    Hello buy a movie on apple tv, and now can not find the device tells me I should go to settings / downloads / check downloads, but that does not exist in the menu of the apple tv, please help

    Welcome to the Apple community.
    A number of people have reported similar issues recently, many appear to have found a discrepancy of some kind in their account settings and making changes to these settings or simply resetting them has resolved the matter.
    Check your account details are correct, check that you are using the correct details for Location, Region and Time Zone. You may want to change these settings and then change them back to see if that helps.
    You might also try logging out of and then back into your iTunes account (Settings > iTunes Store > Apple ID’s > Sign Out) and restarting your router. (Some have reported that after doing this, they need to check for rentals even though it may report that there aren’t any, after which rentals once again appear in the ‘movies’ feature)
    Rentals should appear under their own heading in the ‘Movies’ feature, you might also check at Settings > iTunes Store > Check For Rentals.

  • Data Source does not exist in version A.

    Dear Experts,
    I have created Data Source in R/3 ( ECC ) by t. code rso2. If am trying to display Data source by t.code RSA2 . It gives message
    Data Source does not exist in version A.
    Regrads,
    Anand Mehrotra.

    Hi Anand
    RSO2--->Put DataSource name -
    >Change button -
    >Save -
    >It should open a new screen with DS header data -
    > From Menu ( DataSource -
    >Generate).
    Now you should be able to see your datasource.

  • Hey i cant get into creative cloud because it keeps asking me to verify and email that does not exist nor i have acess to. i cant find out how to sign out and i tried deleting it and re downloading it!

    hey i cant get into creative cloud because it keeps asking me to verify and email that does not exist nor i have acess to. i cant find out how to sign out and i tried deleting it and re downloading it!

    Change/Verify Account https://forums.adobe.com/thread/1465499 may help
    -wrong email https://forums.adobe.com/thread/1446019

  • System keeps looking for a 'server' that does not exist. Is says the old name of my Airport Extreme. Clicking it away (4x) it gets through.

    System keeps looking for a 'server' that does not exist. Is says the old name of my Airport Extreme. Clicking it away (4x) finally  gets through.

    Other weirdness to report: my neighbor upstairs appears to have a Linksys router network on channel 6. My AEBS is on channel 1 so there shouldn't be interference... but according to iStumbler sometimes the signal leaps to 64000 (keep in mind my own Airport never tops 60)! Is that potentially the problem?
    Might it be possible that your neighbor just acquired a 802.11n (pre-N) wireless router recently?
    802.11n effectively increases capacity by doubling the number of Wi-Fi radios and increasing the number of antennas used to push signals out of those radios. 802.11n splits a data frame into multiple pieces. It then transmits these pieces in parallel using multiple radios that are attached to multiple antennas. These antennas blast out signals from virtually the same vantage point – scattering the signals everywhere.
    You may find the following ZDNet article interesting: http://blogs.zdnet.com/Ou/?p=247
    Even if he did not, and you are on good terms, you might want to ask if he can temporarily turn off his wireless, or, at least, reduce the signal strength to see if that will help in your situation.

  • IMovie searching for files for project that does not exist...

    Whenever I fire up iMovie 09 on Lion, it spins, and then tells me it can't find a video file for a project that does not exist. That is, it says 'File xxx.mov from project 'Movie 1 cannot be found - without this file the movie cannot be played.' The project is one I deleted a long time ago, and does not appear in the project list. How can I force iMovie to forget about this?
    Thanks!
    PS the specific error is 'Searching for movie data in file "New Project 1 - Large.m4v". The only button is "Stop". so I press that, then a new dialogue box saying 'The movie file 'New Project Large.m4v" cannot be found. Without this file, the movie cannot play properly." It has cancel and search buttons. Obviously, searching doesn't help - it was deleted a long time ago. Cancelling makes it go away until iMovie is launched again.

    Whitecity,
    This is awesome.
    So moving forward from here, you can narrow down which event is causing the behavior but systematically trial and error. Once you determined the exact event folder, there are subfolders underneath:
    /iMovie Movie Cache/
    /iMovie Stabilization/
    /iMovie Thumbnails/
    Try removing these to see if iMovie rebuilds them.
    Calbe

  • Can't unregister an ROID that does not exist

    Hi
              We are using instate memory replication and during stress, we suddenly began
              to get this error. We are wondering what could be the cause of this error ?
              Has anyone seen this before ?
              Yogi
              Tue Aug 29 01:09:13 EDT 2000:<E> <HttpSessionContext> Unexpected error in
              HTTP session timeout callback
              weblogic.cluster.replication.NotFoundException: remove unable to find
              object -4723387961832123705
              at
              weblogic.rmi.extensions.AbstractRequest.sendReceive(AbstractRequest.java:76)
              at
              weblogic.cluster.replication.ReplicationManager_WLStub.remove(ReplicationMan
              ager_WLStub.java:139)
              at
              weblogic.cluster.replication.ReplicationManager.unregister(ReplicationManage
              r.java:622)
              at
              weblogic.servlet.internal.session.ReplicatedSession.invalidate(ReplicatedSes
              sion.java:255)
              at
              weblogic.servlet.internal.session.ReplicatedSessionContext.invalidateSession
              (ReplicatedSessionContext.java:116)
              at
              weblogic.servlet.internal.session.SessionContext$SessionInvalidator.invalida
              teSessions(SessionContext.java:468)
              at
              weblogic.servlet.internal.session.SessionContext$SessionInvalidator.trigger(
              SessionContext.java:447)
              at
              weblogic.time.common.internal.ScheduledTrigger.executeLocally(ScheduledTrigg
              er.java:197)
              at
              weblogic.time.common.internal.ScheduledTrigger.execute(ScheduledTrigger.java
              :191)
              at weblogic.time.server.ScheduledTrigger.execute(ScheduledTrigger.java:62)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:135)
              --------------- nested within: ------------------
              weblogic.utils.NestedError: Can't unregister an ROID that does not exist -
              with nested exception:
              [weblogic.cluster.replication.NotFoundException: remove unable to find
              object -4723387961832123705]
              at
              weblogic.servlet.internal.session.ReplicatedSession.invalidate(ReplicatedSes
              sion.java:264)
              at
              weblogic.servlet.internal.session.ReplicatedSessionContext.invalidateSession
              (ReplicatedSessionContext.java:116)
              at
              weblogic.servlet.internal.session.SessionContext$SessionInvalidator.invalida
              teSessions(SessionContext.java:468)
              at
              weblogic.servlet.internal.session.SessionContext$SessionInvalidator.trigger(
              SessionContext.java:447)
              at
              weblogic.time.common.internal.ScheduledTrigger.executeLocally(ScheduledTrigg
              er.java:197)
              at
              weblogic.time.common.internal.ScheduledTrigger.execute(ScheduledTrigger.java
              :191)
              at weblogic.time.server.ScheduledTrigger.execute(ScheduledTrigger.java:62)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:135)
              

              When can we expect this to be taken care of?
              This exception fills our logs everyday. Will this be in an upcomming service pack?
              --Michael
              Prasad Peddada <[email protected]> wrote:
              >Probably we should squelch the exception in this case.
              >
              >-- Prasad
              >
              >Mike Reiche wrote:
              >
              >> Shouldn't the trigger be removed when the session is invalidated?
              >>
              >> This is very ugly in the log files - makes hard for us to find
              >> other problems. It would be really, really nice to to see it.
              >>
              >> Mike
              >>
              >> Prasad Peddada <[email protected]> wrote:
              >> >It should never be possible for one user to grab session
              >> >of another user.
              >> >
              >> >So, while the trigger is trying to cleanup session's it
              >> >calls the secondary server
              >> >and asks it to remove the object. In this case, the object
              >> >is already gone for some
              >> >reason. Since the intention is to clean the session, it
              >> >is safe to ignore the
              >> >message.
              >> >
              >> >-- Prasad
              >> >
              >> >Alex Metcalf wrote:
              >> >
              >> >> We are running into this as well. We are trying to
              >> >debug a problem
              >> >> where a person was able to grab the session of another
              >> >user. Our
              >> >> first guess is that this is an application issue. However,
              >> >I would
              >> >> like to be able to rule out this error as a problem.
              >> >Can someone
              >> >> explain what causes this problem and whether it affects
              >> >session
              >> >> data.
              >> >>
              >> >> We are using WLS 5.1 SP8 on Solaris 2.7. Additionally,
              >> >we have
              >> >> installed Open Market on top of WLS.
              >> >>
              >> >> Thanks,
              >> >> Alex
              >> >>
              >> >> Prasad Peddada <[email protected]> wrote:
              >> >> >Typically you should be too concerned about this. But
              >> >> >out of curiosity, what's
              >> >> >the load on the servers and could you more information
              >> >> >about your setup
              >> >> >including the heap size you were using etc.
              >> >> >
              >> >> >Thanks
              >> >> >
              >> >> >- Prasad
              >> >> >
              >> >> >Yogi Mudras wrote:
              >> >> >
              >> >> >> We are using SP 5 on Win NT.
              >> >> >>
              >> >> >> "Wei Guan" <[email protected]> wrote in message
              >> >> >> news:[email protected]...
              >> >> >> > Please use service pack 5.
              >> >> >> >
              >> >> >> > --
              >> >> >> > Cheers - Wei
              >> >> >> >
              >> >> >> >
              >> >> >> >
              >> >> >> > Yogi Mudras <[email protected]> wrote in
              >> >message
              >> >> >> > news:[email protected]...
              >> >> >> > > Hi
              >> >> >> > >
              >> >> >> > > We are using instate memory replication and during
              >> >> >stress, we suddenly
              >> >> >> > began
              >> >> >> > > to get this error. We are wondering what could
              >> >be
              >> >> >the cause of this
              >> >> >> error
              >> >> >> > ?
              >> >> >> > > Has anyone seen this before ?
              >> >> >> > >
              >> >> >> > > Yogi
              >> >> >> > >
              >> >> >> > > Tue Aug 29 01:09:13 EDT 2000:<E> <HttpSessionContext>
              >> >> >Unexpected error
              >> >> >> in
              >> >> >> > > HTTP session timeout callback
              >> >> >> > > weblogic.cluster.replication.NotFoundException:
              >> >> >remove unable to find
              >> >> >> > > object -4723387961832123705
              >> >> >> > > at
              >> >> >> > >
              >> >> >> >
              >> >> >> weblogic.rmi.extensions.AbstractRequest.sendReceive(AbstractRequest.java:76)
              >> >> >> > > at
              >> >> >> > >
              >> >> >> >
              >> >> >> weblogic.cluster.replication.ReplicationManager_WLStub.remove(ReplicationMan
              >> >> >> > > ager_WLStub.java:139)
              >> >> >> > > at
              >> >> >> > >
              >> >> >> >
              >> >> >> weblogic.cluster.replication.ReplicationManager.unregister(ReplicationManage
              >> >> >> > > r.java:622)
              >> >> >> > > at
              >> >> >> > >
              >> >> >> >
              >> >> >> weblogic.servlet.internal.session.ReplicatedSession.invalidate(ReplicatedSes
              >> >> >> > > sion.java:255)
              >> >> >> > > at
              >> >> >> > >
              >> >> >> >
              >> >> >> weblogic.servlet.internal.session.ReplicatedSessionContext.invalidateSession
              >> >> >> > > (ReplicatedSessionContext.java:116)
              >> >> >> > > at
              >> >> >> > >
              >> >> >> >
              >> >> >> weblogic.servlet.internal.session.SessionContext$SessionInvalidator.invalida
              >> >> >> > > teSessions(SessionContext.java:468)
              >> >> >> > > at
              >> >> >> > >
              >> >> >> >
              >> >> >> weblogic.servlet.internal.session.SessionContext$SessionInvalidator.trigger(
              >> >> >> > > SessionContext.java:447)
              >> >> >> > > at
              >> >> >> > >
              >> >> >> >
              >> >> >> weblogic.time.common.internal.ScheduledTrigger.executeLocally(ScheduledTrigg
              >> >> >> > > er.java:197)
              >> >> >> > > at
              >> >> >> > >
              >> >> >> >
              >> >> >> weblogic.time.common.internal.ScheduledTrigger.execute(ScheduledTrigger.java
              >> >> >> > > :191)
              >> >> >> > > at
              >> >> >> > weblogic.time.server.ScheduledTrigger.execute(ScheduledTrigger.java:62)
              >> >> >> > > at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:135)
              >> >> >> > > --------------- nested within: ------------------
              >> >> >> > > weblogic.utils.NestedError: Can't unregister
              >> >an
              >> >> >ROID that does not
              >> >> >> exist -
              >> >> >> > > with nested exception:
              >> >> >> > > [weblogic.cluster.replication.NotFoundException:
              >> >> >remove unable to find
              >> >> >> > > object -4723387961832123705]
              >> >> >> > > at
              >> >> >> > >
              >> >> >> >
              >> >> >> weblogic.servlet.internal.session.ReplicatedSession.invalidate(ReplicatedSes
              >> >> >> >
              >> >> >> > > sion.java:264)
              >> >> >> > > at
              >> >> >> > >
              >> >> >> >
              >> >> >> weblogic.servlet.internal.session.ReplicatedSessionContext.invalidateSession
              >> >> >> > > (ReplicatedSessionContext.java:116)
              >> >> >> > > at
              >> >> >> > >
              >> >> >> >
              >> >> >> weblogic.servlet.internal.session.SessionContext$SessionInvalidator.invalida
              >> >> >> > > teSessions(SessionContext.java:468)
              >> >> >> > > at
              >> >> >> > >
              >> >> >> >
              >> >> >> weblogic.servlet.internal.session.SessionContext$SessionInvalidator.trigger(
              >> >> >> > > SessionContext.java:447)
              >> >> >> > > at
              >> >> >> > >
              >> >> >> >
              >> >> >> weblogic.time.common.internal.ScheduledTrigger.executeLocally(ScheduledTrigg
              >> >> >> > > er.java:197)
              >> >> >> > > at
              >> >> >> > >
              >> >> >> >
              >> >> >> weblogic.time.common.internal.ScheduledTrigger.execute(ScheduledTrigger.java
              >> >> >> > > :191)
              >> >> >> > > at
              >> >> >> > weblogic.time.server.ScheduledTrigger.execute(ScheduledTrigger.java:62)
              >> >> >> > > at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:135)
              >> >> >> > >
              >> >> >> > >
              >> >> >> >
              >> >> >> >
              >> >> >
              >> >
              >
              

  • How can I change my Apple ID that is set up with an old email that does not exist anymore

    I set up an Apple ID years ago with a hotmail email account. I also deleted that hotmail email account years ago. I now have a gmail email. I cannot back up anything to icloud because of my apple id that is connected to the hotmail email account that does not exist anymore. To change my ID, apple sends a verification email to my old hotmail account which i cannot access, and it also says my gmail account is my rescue account, so I wouldn't be able to change it to my gmail account anyway.  Any ideas? I'd like my ID to be associated with my one and only current gmail email account. I have a lot of songs that I've spent a lot of money on over the years that I don't want to lose.

    See Here > Apple ID: Contacting Apple for help with Apple ID account security
              Ask to speak with the Account Security Team...

Maybe you are looking for