Check what records are missing in child tables when compared to Primary tables

I have a person table(200 records with 200Persons),Column Person Id (PK),FN, LN,USERNAME and there are 13 tables which are referenced by Person id ex: Attachement table has a column UpdatedPersonid
ex: Inventory table has a column ModifiedbyPersoind
like wise I have 13 child tables...
What i need to find is which person is not active , which means i have to find which personid  is not exists  in any 13 tables, so that i can delete the person  from Personid (person table)....I know a way to do for each table, but i am more
interested in a single query to find which user is not active ..
Please help me  ..Thanks

Select p.PersonID, p.FN, p.LN, p.USERNAME
FROM Persons p
Where Not Exists(Select * From Table1 t Where p.PersonID = t.PersonID)
And Not Exists(Select * From Table2 t Where p.PersonID = t.PersonID)
And Not Exists(Select * From Table3 t Where p.PersonID = t.PersonID)
And Not Exists(Select * From Table13 t Where p.PersonID = t.PersonID)
Tom

Similar Messages

  • Some records are missing in the mail, when scheduled a background job.

    There is a Z report,  which will display some details from SD, MM , WM every day , and the same thing need to be mailed to the user through background Job.
    Issue is that spool is correct and it is missing some records ( Billing due list ), even internal table have records and displayed in the spool , in the mail it says
    “No Entries Found”.
    Is there any chance of debugging background job.
    Good thing is that when executed in foreground it is working fine. Both mail and report display.

    EM_BODY = '4) VF04 -- Processing Billing document due list.'.
      APPEND EM_BODY.
      EM_BODY = ' '.
      APPEND EM_BODY.
      IF IT_FINAL3[] IS INITIAL.
        EM_BODY = '        No Entry Found'.
        APPEND EM_BODY.
        EM_BODY = ' '.
        APPEND EM_BODY.
      ELSE.
        CONCATENATE 'Delivery No' 'Created By' 'Created On'
                     'Reason' INTO HEAD SEPARATED BY '     '.
        EM_BODY = HEAD.
        APPEND EM_BODY.
        EM_BODY = ' '.
        APPEND EM_BODY.
        CLEAR V_TEXT.
        CLEAR ITEM.
        LOOP AT IT_FINAL3.
          CONCATENATE IT_FINAL3-VBELN  IT_FINAL3-ERNAM IT_final3-ERDAT
                      IT_FINAL3-RESO INTO ITEM SEPARATED BY '     '.
          V_TEXT = ITEM.
          EM_BODY = V_TEXT.
          APPEND EM_BODY.
        ENDLOOP.
        EM_BODY = ' '.
        APPEND EM_BODY.
      ENDIF.
    This is the part where it is failing, where it_final3[] is initial.
    but whereas in the spool i can view those records.

  • Few records are missing while downloading to a Spreadsheet  from a Report

    Dear Gurus,
    few records are missing while downloading to a Spread sheet from a Z report.  There are around 300 records, out of which 11 records are not appearing in Spreadsheet file after saving.  But, the funny thing is when i try to save in other format like, HTML or to a clip board all records are coming. 
    When asked, the ABAPer said -
        your report is coming correctly.  if the report is wrong then we can try checking some code in the Z report.  Saving it into Spread sheet is the standard program provided by SAP.
    He is also facing this problem for the first time.
    Can anybody help.
    Thanks in advance and u will get points if useful.
    Regards

    Hi,
    Few days back we got this kind of error, when i tried to down load the asset balances in excel format.
    It was observed that, for one of the asset description ends with cama",".  Due to this reason all other details has been stored in single cell.  Once we changed the master data of that asset, then we able to get the report properly.
    2) Some other time, when we tried to download material master details, for one of the material ... description not maintained.  this is another issue. After maintain the description problem got resolved.
    Hope this information will be helpful to u.

  • How to check what fields are output from ABAP to smartform

    Hi All,
    I am working on a Zcopy of RLB_INVOICE smart form and need to check what fields are being output to the vendor_address window in the smartform.
    I have examined the NACE setup and found "Medium -> printoutput", "Program -> ZRLB_INVOICE", "Form Routine -> "ENTRY_INS", "Form -> ZRLB_INVOICE", "PDF/SmartForm -> ZRLB_INVOICE".
    Where would I find the code that shows the direct correlation between the driver program and a specific element of the smart form.
    All I need to check is that all elements of the venfore address are being sent to the form as I am hearing reports that we are missing house number on the printed output.
    Many thanks

    Hi Meenakshi,
    First you find out your driver program. Here in your case it is ZRLB_INVOICE. Then within that check where address of the vendor is found and is assigned to which import parameter of the smartform.
    Check your smartform also. Find which all fields are being printed in that. If vendor_address window is an address window, then there will be uniques identifier passed to that window from the driver program.
    Regards,
    Abijith

  • Records are Missing when we run Delta Load( FIGL-ACCOUNT ITEMS)

    Hi,
      Some records are missing when we run Delta load.
    We have one generic data source on FAGLFLEXA table.
    We select  Field nm TIMESTAMP
    TIME STAMP IS LOCAL.
    upper limit is Blank
    Lower limit is 1000.
    we run this process chain every day.
    we select delta settings is New status for changed records.
    Please give me any idea why records are missing when we run deltas.
    Thanks
    Naik

    Hi Anju,
    Please ensure that you are following the below steps while Initilizing the application 13:
    1. All the users in source system, must be locked.
    2. Ensure that SMQ1 and RSA7 are having no data for application 13. Delete the application 13 datasource entries from RSA7.
    3. Delete and refill the setup tables for application 13.
    4. Run a INIT with data transfer load for the required datasources of application 13.
    5. The Deltas can follow from the next day.
    This will ensure that your deltas are fetching correct data. Note that, delta will pick up the same conditions on which the INIT load was run.
    Please let me know if you need any more information.
    Regards,
    Pankaj

  • HT1209 My Itunes Library and iPhone have fallen out of sync on music over the yearsare - how can I compare my itunes library with my Iphone  to see what songs are missing from my library so I can then bring my Library up to date

    My Itunes Library and iPhone have fallen out of sync on music over the yearsare - how can I compare my itunes library with my Iphone  to see what songs are missing from my library so I can then bring my Library up to date

    Hello Solid Buck,
    Thank you so much for providing the details about the duplicate song issue you are experiencing.  It sounds like you would like to remove the duplicate songs that will not play on your iPhone, but when you connect it to iTunes, iTunes only shows you one copy of the song on your iPhone. 
    In this situation, I recommend deleting the individual songs that do not play directly from your iPhone.  I found the steps to do this on page 61 of the iPhone User Guide (http://manuals.info.apple.com/en_US/iphone_user_guide.pdf):
    Delete a song from iPhone: In Songs, swipe the song, then tap Delete.
    Thank you for using Apple Support Communities.
    Best,
    Sheila M.

  • Data Records are missing in between while loading from R/3 (ECC) to BI.

    Dear Experts,
    I have created a custom DataSource on Custom Function Module.  This datasource contains 600 fields. (I know its a monster and splitting options are thinner).
    1) Validate the data using RSA3 in R/3 and showed the correct record count.
    2) Validate the data by debugging the FM, still showed the correct record count.
    But while loading from R/3 to BI, records are missing.
    Various Scenarios load from R/3 to BI:
    1a) Loaded full load (78000 records) with all default data transfer settings.  PSA showed up with 72000 records (missing 6000) only.  Compared the Idocs vs data packets, both reconciled.
    1b) Loaded full load (78000) with modified settings (15000 KB / data packet).  PSA showed up with 74000 records (missing 4000) only.
    2a) Loaded with selection parameters (took a small chunk) (7000 records) with default data transfer settings.  PSA showed up only 5000 records (missing 2000).
    2b) Loaded with selection parameters (7000 records) with modified settings (15000 KB / data packet).  PSA showed up all 7000 records.
    3a) Loaded with selection parameters (took further small chunk) (4000 records).  PSA showed up all records regardless data transfer settings.
    Also please look at this piece of code from the function module,
    IF l_wa_interface-isource = 'ZBI_ARD_TRANS'.
          l_package_size = l_wa_interface-maxsize DIV 60.
        ENDIF.
    I really appreciate your advise or help in this regard.
    Thanks much,
    Anil

    Hi,
    Which module u want?
    if its SD(for example)
    steps>>
    1>In AWB goto "business content"
    2> goto "Info provider"
    3>Under infoarea select SD cubes
    4> Drag related cubes and ODS to right panel
    5> Set the grouping option "In Data flow before&afterwards"
    6>Install the collected objects
    Go to R/3
    7> Use Tcode RSA5 Transfer all regarding SD module datasources
    Goto BW
    8> Right click on the source system "Replicate datasources"
    [DataSources|http://help.sap.com/saphelp_nw70/helpdata/en/3c/7b88408bc0bb4de10000000a1550b0/frameset.htm]
    Edited by: Obily on Jul 10, 2008 8:36 AM

  • 10 minutes of the center part of a skype video recording are missing? Help!

    10 minutes of the center part of a skype video recording are missing? Help!

    I'd urge you not to be too hasty. Record more. Does the problem repeat? If you experience similar audio dropouts on other recordings, then it's time to worry. Whatever you experienced may have been a one-time event.
    There are many ways to capture audio besides QuickTime: Audacity (free) and Piezo ($) are two popular alternatives. Piezo 1.2.2 is the last version for Snow Leopard. You can get a free demo version here: https://rogueamoeba.com/legacy/. I don't know which one has lower system requirements--and, in fact, QT may be the most efficient of the lot. Experiment.
    4GB RAM should be sufficient, though more RAM never hurts. That iMac (Core i3, 3.2GHz, mid 2010) will accept as much as 16GB. Adding RAM is generally the easiest and most cost-effective way to boost performance of an older machine.
    490MB for 31 minutes of audio. It sounds as if you've set QuickTime X to record with "maximum" quality. Change to "high" and the file size will shrink to around 10% of that amount.  In fact, with simple voice recordings, maximum is usually overkill. However, I doubt that the maximum/high setting will have a dramatic effect on the resources needed to make the recording.
    As far as backups, that voice recorder could save your bacon one day. If these Skype sessions can't be repeated, any backup system will be better than none. Most voice recorders these days have a USB port and sometimes an application that will allow you to transfer the recording to your computer. Even old voice recorders with only a headphone jack can be connected to your Mac via audio in for a "better than nothing" file.

  • Having issues with contacts... groups specifically... when I add contacts to a group and check back there are fewer in group than when i started.. they disappear??

    having issues with contacts... groups specifically... when I add contacts to a group and check back there are fewer in group than when i started.. they disappear??

    Hi
    in this scenarion control is not going inside the condition
    if (vo.getRowCount() == 0) and therefore VO is not getting initialized
    why u are counting the row of VO to initialize the VO ,if possible pls remove this condition check ,problem will be solved .pls let me know in case of any issues.
    thanx
    Pratap

  • PL/SQL-find out extra rows present in  table by comparing 2 similar tables

    Hi, can any one give me an idea to find out the extra rows present in table by comparing 2 similar tables using pl/sql.
    REQUIREMENT::i am working on the upgrade environment.my previous database has some tables and having data.Now functional folks are adding some new data to the existing tables for the upgrade database.I need to identify that new rows which are added by them.
    for this , i created name table with 2 columns n,n1 which contains the table names.
    Table Name:Name
    columns:n n1
    a ax
    b bx
    c cx
    a,b c........are the table names which are in the previous database environment.(approx >1500 tables)These tables having data.
    ax,bx,cx..........table names which are in the upgrade environment contains the extra data which is added by the functional folks.
    a&ax,b&bx.................(approx 1500 tables) are having same structure except some of them.
    Now i want to write a pl/sql program that reads both table names a&ax from name table and then by comparing the rows of a&ax ,i need to find out the extra rows present in the ax table to store that in different place.
    Example:
    a table
    id name
    1 co
    2 wi
    3 il
    ax table
    id name
    1 co
    2 wi
    3 il
    4 va
    5 ca
    Here i need to find out the difference b/n the 2 tables ,the extra rows id 4,5 and place it some where.

    this is just for demo, is this you mean?
    SQL> ed
    Wrote file afiedt.buf
      1  SELECT empno,ename,e.DEPTNO emp_deptno, d.deptno dept_deptno,d.DNAME
      2  FROM EMP e full outer join DEPT d
      3* on d.DEPTNO= e.DEPTNO
    SQL> /
         EMPNO ENAME      EMP_DEPTNO DEPT_DEPTNO DNAME
          7934 MILLER             10          10 ACCOUNTING
          7839 KING               10          10 ACCOUNTING
          7782 CLARK              10          10 ACCOUNTING
        snipp........
          7521 WARD               30          30 SALES
          7499 ALLEN              30          30 SALES
          156 1
    12 1
    40 OPERATIONS
    90 LOGISTIC
    18 rows selected.
    SQL> ed
    Wrote file afiedt.buf
      1  SELECT empno,ename,e.DEPTNO emp_deptno, d.deptno dept_deptno,d.DNAME
      2  FROM EMP e left outer join DEPT d
      3* on d.DEPTNO= e.DEPTNO
    SQL> /
         EMPNO ENAME      EMP_DEPTNO DEPT_DEPTNO DNAME
          7934 MILLER             10          10 ACCOUNTING
          7839 KING               10          10 ACCOUNTING
          7782 CLARK              10          10 ACCOUNTING
          7902 FORD               20          20 RESEARCH
        snipp..................
          7654 MARTIN             30          30 SALES
          7521 WARD               30          30 SALES
          7499 ALLEN              30          30 SALES
           156 1
    12 1
    16 rows selected.
    SQL> ed
    Wrote file afiedt.buf
      1  SELECT empno,ename,e.DEPTNO emp_deptno, d.deptno dept_deptno,d.DNAME
      2  FROM EMP e[b] right outer join  DEPT d
      3* on d.DEPTNO= e.DEPTNO
    SQL> /
         EMPNO ENAME      EMP_DEPTNO DEPT_DEPTNO DNAME
          7369 SMITH              20          20 RESEARCH
          7499 ALLEN              30          30 SALES
          7521 WARD               30          30 SALES
          7566 JONES              20          20 RESEARCH
          snipp......................
          7902 FORD               20          20 RESEARCH
          7934 MILLER             10          10 ACCOUNTING
                                             40 OPERATIONS
    90 LOGISTIC
    16 rows selected.

  • Records are missing in KONV tables.

    I have created an invoice and saved it.
    In displaying mode, all the condition types are present but in print preview the condition types are missing.
    Checked in the KONV table, the records for the condition types are missing.
    I dont know why they are missing in the KONV table. And if missing how they are present in the invoce but absent in the print preview.

    It cannot happen and is not possible.
    You are doing some mistake while looking at KONV and if the values are not printing in the form, then there is some problem in the coding.
    You have to use VBRK-KNUMV as KONV-KNUMV and then see the details.
    If you want to see values at item level pricing, then apart from the above logic, use KONV-KPOSN as VBRK-POSNR.
    Even after this if you are not finding values in KONV, please let me know.

  • Records are missing in the File which XI has placed in Target FTP server

    Hi All,
    I have a scenario where in XI is transfering the files from ECC to Target System . No transformation required here . I am using AAE to run this scenario.
    Issue i am facing here is that i can see few records missing in the File  which XI had placed in the Target system FTP server . Same file if i check it in archive folder of ECC (which XI has archived after picking the file), complete set of records are present for the same file.
    Need your inputs please....
    Note : XI is using AAE to transfer the files and no mapping . Also i tried to check out the audit logs in the channel monitoring . Unforutanely i was not able to see the logs to check the bytes that was transferred while readng and writing the file . Sometimes i have faced audit logs issue in PI 7.1
    Regards
    Vinay P.

    Please use temporary name scheme
    http://help.sap.com/saphelp_nwpi711/helpdata/en/44/6830e67f2a6d12e10000000a1553f6/content.htm
    hope this helps
    regards
    Ninad

  • How to tell what fonts are missing in a Photosohp CS5 document?

    Hello!  I have received some work from a graphic designer.  I need to modify some of the text in the document.  When I open the document I get an error message:
    Some text layers might need to be updated before they can be used for vector based output.  Do you want to update these layers now?  [Update] [No]
    If I click [Update] it replaces the font with Myriad Pro.  If I click [No] the text looks the way the designer intended, but I have the exclamation mark-triangle symbol over the layer with the text.  If I try to edit the text I get another warning:
    Editing or rendering the text layer "Text Layer" will cause its layout to change.  Continue?  [Cancel]  [OK]
    The same behavior described above occurs.  If I click [Cancel] I obviously can't edit the text.  If I click [OK] it changes the font to Myriad Pro.
    I would like to determine what font the layer is using.  I could swear that previous versions of Photoshop would tell me what fonts were missing when I opened a document.  I can't use the text tool to select the text without it changing the font.  Other posts have mentioned using the text tool to look at the text drop-down to find a greyed-out font which indicates the missing font.  I do not have that.  I only have perhaps 200 fonts installed.  Can anyone tell me how to determine what fonts a .PSD document is using?  I would prefer not to bug the graphic designer if possible.  Thanks much!
    ~ Dan

    Not sure why you are getting ""Font is present on the system but requires a layout change.", usually you do not get that instead the name of the font shows.
    We use extensis Universal Type Client, so the fonts load automatically upon opening files, and never really get missing fonts in Photoshop.
    Actually fontbook has auto font loading if you want to give that a try. Fontbook >> Preferences

  • How can I find out specifically what plugins are missing? Am told missing, then plugin finder tells me no suitable found, I would look for them myself but have no way to find out what exactly need to look for.

    I go into a wiki created by my employer, and get the bar at top of page almost immediately telling me there are plugins needed. I click the button offered for finding plugins, and almost immediately am told no suitable plugins are found. Plugin help offered is useless, because I have no idea what plugins I need to look for. How can I find out what plugins are being detected as "missing"?

    If there is no LR edits to keep, or if you don't want to keep the existing edits, you could delete the files from LR and import them again.
    Since the file names on disk and file names in LR don't match, you will need to manually match them up by hand individually, if you want to keep the existing LR edits.
    The easiest approach to this -- without doing any script programming -- is to go into each directory, one at a time:
    Select the correct folder in the "folders" pane. Right-click "show parent" as necessary to see the directory tree.
    Sort the LR Library by creation date.
    Using the details view in File Explorer, sort the files by creation date (add to the viewed columns if necessary).
    Assuming no more than 1 image per second, the files should line up.

  • Checking what others are upto on my wireless network.

    Hi
    I have a wireless network set-up, using an airport extreme base station (domed type). How can I check what websites other uses are using? Can I restrict other users time limits or websites?
    Cheers
    Phil B

    Not sure if such a widget exists, but here are two other options:
    1. The airport utility lets you see which devices are connected, and their rate. It doesn't tell you what they are doing, but depending on activity you can see if they are being used or idle.
    2. Use a program to see what's going on with each device. Wireshark lets you see the connections from each device, live. It's painful to get data from it; but if you know the ip of the device, you can filter what you're capturing and see the activity. Etherpeg, if configured correctly, will intercept images, and other media that are being browsed on your network.
    Option 1 is probably the best; and if your network is encrypted, you might have problems with option 2 (especially etherpeg). I'll keep my eyes open for a widget.

Maybe you are looking for