script to delete data?

I have a script created to find orphaned data however I would like to add to this script so that when it detects data it deletes instead of write a new script to delete data?... is this possible and how do I add to the script?

any help is appreciated...

Set serveroutput on

BEGIN
DECLARE
v_a VARCHAR2 (9);
YaeUb VARCHAR2 (9);
lt VARCHAR2 (1) DEFAULT 'n';
CURSOR c1
IS
SELECT NVL (a.ssn, 'none'),
NVL (b.SSN, 'none')
FROM table1 has,
Table 2b
WHERE a.ssn = b.ssn (+);
BEGIN
dbms_output.put_line (records from table 1 with any of the records of the table 2);
OPEN c1;
LOOP
FETCH c1 INTO v_a, YaeUb;
OUTPUT WHEN c1% NOTFOUND;
IF YaeUb = "none" THEN
dbms_output.put_line (v_a);
lt: = 'Y ';
END IF;

END LOOP;
IF lt = 'n' THEN
dbms_output.put_line ('None Found');
END IF;
CLOSE c1;
END;

If you can do it in SQL do it without having to write the PL/SQL

http://asktom.Oracle.com/pls/Apex/f?p=100:11:0:P11_QUESTION_ID:3187586500346873603

 delete from table1 a where not exists ( select null from table2 where ssn=a.ssn); 

HTH...

Tags: Database

Similar Questions

  • How to delete data that has been downloaded? (NOT all data)

    Hello

    I would like to delete data that I downloaded up to a point. I'm on 11.1.2.1.

    The dimensions I have are;

    Accounts
    Periods - FEB
    Years - 2013_2014
    -Real-world scenarios
    Versions - final
    ABCGroup
    Products
    POV - monthly

    I do the download via the text file and have a rules file to get the upload done. ABCGroup has several cost centers, several account codes, product codes and amounts. That's what is downloaded.

    Example:

    Real, Final, monthly publication, 2013_14, FEB
    ABCCGroup, accounts, products
    403,5732,000,-3165694.41

    403,7321,000,-36081516.27

    403,7321,101,36081516.27

    I would like to know if it is possible to delete all the data that has been downloaded by this text file.

    Thank you

    Hello

    Just do the same combination in excel add in or smart view and change the value to #Missing and send it.

    The other way is that you can write a script for the same and use CLEARDATA inside.
    Please see the link - http://docs.oracle.com/cd/E12825_01/epm.111/esb_dbag/frameset.htm?dcadevcs.htm

    Hope this helps

    Concerning
    OHS...

  • Removig DB on ASM with DBCA do not delete data files

    Hello
    I have a 11.2.0.3 db on a two node cluster (oracle) linux 64-bit.
    Yesterday, I created a database on ASM named RACDB.
    Today I deleted it with DBCA and I recreated.
    Look in ASM I see that this old data file already exists.
    Why? Is there a procedure to purge unused data files?

    Thank you

    deleting a database with DBCA should have deleted data files, online newspapers, controlfiles, etc..

    Why? Is there a procedure to purge unused data files?

    no procedure to do this, just make your own script/checks and manually delete

  • How can I remove an account from a computer profile without deleting data?

    Hello! I want to delete mozilla of a computer and delete my account profile so that all my data on this computer is removed. But I use the same profile in mozilla on a different computer and I do not know if my profile will retain the data stored on this computer after it is deleted in the other. Can you please clarify this issue for me. Thank you!

    Best,
    Vanya

    If you want to remove your personal data on a reliable computer, then you will need to perform a secure erase to erase the data on the hard drive.
    Otherwise Windows will mark only data as being deleted.

    It is best to disconnect from Sync before you delete data on a computer to prevent other computers from getting affected.

    You can use the Profile Manager to delete a profile.

  • Help creating a script to delete users specific bunch of disconnection

    Hi guys

    I was wondering if you could help me out, I read in the creation of a script that deletes a bunch of disconnected users.

    I find stuff a lot saying that connection/disconnection hooks are now obsolete but they are still functional in El Cap.

    However my question is in what regards the script itself. I was going to create a shell script logout following the advice on this page http://www.amsys.co.uk/2015/02/delete-keychains-logout/?nabe=5737850786545664:0 but I want to make is specific to a single user, I don't want bunch of our normal users to be affected. This script would be attached to our account by Freelance. It would save me time to clear up after that freelancers have used our kit.

    Any advice/help would be very appreciated

    Thank you

    K miles

    Hey there manbearpig349,

    Welcome to the communities of Apple Support!

    For some details added here, looks like you have a computer with multiple user accounts. You want to create / run a script for any one of these user accounts, is - that correct?

    For more details on how the scripts, in the link mentioned above, it would be best to speak directly with the creators to Amsys.

    See you soon

  • I got a message saying that my iCloud storage is almost full. However, I tried to delete data in iCloud and I can't. Any suggestions?

    I got a message saying that my iCloud storage is almost full. However, I tried to delete data in iCloud and I can't. I get a message saying to try again later. When I try it later, I get the same message. Is - this forcing just to buy extra storage space, or am I being too cynical? Any suggestions?

    Take a look at this article, it can help you manage your iCloud - Apple Support storage space

  • I want to delete data from my i cloud storage for the little free space without increasing the storage capacity. How to do?

    I want to delete data from my i cloud storage for the little free space without increasing the storage capacity. How to do?

    Storage of parameters/iCloud/Storage/manage or delete some of the data being synchronized with iCloud, such as photos.

  • removal of deleted data

    Is it possible to recover deleted data, such as text messages, photos, phone calls... the iPhone6 etc. no backup has never been done to the iCloud.

    If it has not been saved and you deleted, it is gone.

    Identified call should be available from your carrier, of course.

  • Recovery of accidentally deleted data

    Hello

    I have a feeling there is no solution to this but here goes, my daughter has deleted data recovery on the L300-299.
    Is it possible to recover? The partition has been formatted, so I couldn't t get something in return.
    Toshiba is no ISO or whatever it is in these circumstances? Any help would be appreciated.
    Frankly

    Unfortunately there is no way to recover this data.
    Data recovery is not downloadable.

    Only thing you can do is to order the new DVD of recovery under https://backupmedia.toshiba.eu/landing.aspx

  • VI LabVIEW 2012 script: Method - delete not yet implemented framework

    Hi all

    I use screws LabVIEW 2012 script to delete the events to the event structure. For some reason, I get the following error

    Is it possible that a method is listed without running? Suggestions to overcome this is welcome. Thanks in advance

    Kind regards

    S.P.Prasaanth

    According to this http://forums.ni.com/t5/LabVIEW/Remove-Frame-Not-Implemented/m-p/2100644/highlight/true#M684629 post: Yes, it can be.

    But it seems that implemented in LV2013: http://forums.ni.com/t5/LabVIEW-Idea-Exchange/Configure-Event-Case-with-Scripting/idc-p/2523818/high...

  • FAT32, exFAT, NTFS, which is the best for the recovery of deleted data?

    I have a usb 3.0 port (Kingston 100 3 16 GB) to store my important data. I read the article on this site: http://www.ntfs.com/ntfs_vs_fat.htm

    and they say recoverablitity of exFAT is "Yes if FAT active." I don't know what FAT and how to activate it, and what type of file system should I use (FAT, exFAT, NTFS) for the highest ability of data recovery if they are deleted?

    Hello

    Thanks for posting your query on the Microsoft Community.

    According to the description of problem, you're ready to recover the deleted data and would like to know some information about the FAT.

    A transaction-safe FAT (FAT) file system is a file system designed specifically to ensure the security of transactions for data stored on a disk. FAT requires a driver of specific hardware designed for the type of media on which the volume of FAT will exist. Assuming that there is a driver of material-specific secure transaction block, and that the driver provides interfaces to standard FAT file system, the FAT may work on removable media such as Compact Flash cards and digital cards secured, as well as media not removable, such as hard drives and NAND Flash memories.

    By design, the FAT file system is not a secured file transaction system. FATF may be corrupted if a write operation is interrupted in the middle of a transaction. Interruptions to occur due to loss of power or the suppression of the media. Fat is corrupted when the content of the FAT table does not have directory sections or data on the volume.

    I suggest you to return the article mentioned below and see if it helps you to recover lost or deleted data on your computer.

    Recover lost or deleted files

    As you disposed him to know FAT and his work, then here are some articles that might help you to learn more about FAT and its function.

    With the help of FAT (Windows CE 5.0)

    How to set up a system of FAT (Windows Embedded CE 6.0) file

    Transaction-Safe FAT File System (Windows IT 5.0)

    Implementation of FAT (Windows IT 5.0)

    Additional information:

    You can see the article mentioned below to learn more about NTFS and FAT32.

    Comparing the NTFS and FAT32 file systems

    Hope that the information provided is useful. Let us know if you have any concerns related to Windows. We will be more than happy to help you.

    Kind regards

  • How can I sort the trash by deleted Date?

    When you click on the search bar, a list will appear as "modification date:" but if it means "Sort by date deleted" it has not worked.  The photos that I had just deleted do not show upward.   "Organize" does not seem to be a way to organize by date deleted either. Clearly, Miss me something important, because it appears that the most likely use of the trash is to recover from the Oops! having just deleted something accidentally.

    Thanks to the one who can help me here!
    Pollyantha

    Put in details.  If the deleted Date does not already appear, then right-click on the line where you see the original location, name, etc and check the deleted Date.

  • Facing the question in calc script while trip data for the current year to the previous year

    Hi all

    Need your serious help in my calc script.

    I am writing a calc script to transfer data from order book of FY15 Q1 to Q4 FY14 here is the problem in my script. If spin this script to copy the same year, it works fine but when trying to load between two different years, it does not work. could someone help me please. where miss me the logic. Thanks for the help in advance.

    Here's the script:

    ESS_LOCALE English_UnitedStates.Latin1@Binary

    SET AGGMISSG

    DIFFICULTY (@List ("real GL", "Real ML", "ACT", & ActualLoadYrBklg))

    () "Dec / (Inc.) in suffering.

    IF (@Ismbr ("Q4"))

    "Dec / (Inc.) in suffering (Non - di) =.

    -1 * (("Q1"-> "starting Backlog",-1,@Relative("Years",0)) @Prior - ' count backward (Non - di) ");

    "DENTE change overdue =.

    -1 * (@Prior ("Q1"-> "Cost",-1, @Relative("Years",0))-"Cost of rear" rear);

    Else if (@IsMbr ("Q1": "Q3"))

    "Dec / (Inc) order book ' =-1 * (@Prior ('Rear start',-1, @Relative("YearTotal",0))-" starting back (Non - di) "");

    'Change of GEAR wheels in suffering' =-1 * (@Prior ("backward Cost",-1,@Relative("YearTotal",0)) - "money back");

    endif ;)

    endfix

    SM.

    My first question is what is the order of members in your dimension years and quarter the level low your dimension of periods? Secondly, what dimensions are rare and dense (can you tell me which members in the calc are in dense and sparse dimensions)

    Third, you cite the specific years FY15 and FY14, I suppose that & ActYearBklg is FY15 assuming this is correct, I would add a substitution variable for & PriorYrBklg with FY14 inside (if I'm back, and then modify the variables) for clarity, I'm going to hardcode the values in the Calc. It also assumes years is sparse

    You can try this

    FIX ("GL 'real 'real ML", "ACT", "FY15") / * you need not @list * /.

    () "Dec / (Inc.) in suffering.

    IF (@Ismbr ("Q4"))

    "Dec / (Inc.) in suffering (Non - di)"-> "FY14 =.

    -1 * ("Q1'-> 'backlog begins' - 'Start rear (Non - di)'->"FY14");

    "DENTE change orders"-> "FY14 =.

    -1 * ("Q1"-> "Of back - cost"Back cost"-> FY14");

    Else if (@IsMbr ("Q1": "Q3"))

    ("Dec / (Inc) order book"-> "FY14' =-1 * beginning backlog->"FY14'-'Begins the backlog (Non - di)');

    'Change of CMV in the order book "->" FY14' =-1 * ('Back cost'-'Back cost'-> "FY14");

    endif ;)

    endfix

    The years may be replaced by the subvars

  • Can anyone share a script file of data sample for me pump?

    I just want to write a sample script for backup data pump regularly...

    Thank you

    Andrew.

    Please see if it's useful:

    http://matthiashoys.WordPress.com/2012/05/03/example-data-pump-export/

    K.

  • Build a relationship of Scripts to load data by using a load rule

    You can build a relationship of Scripts to load data using a rule charge and if so, what would this process

    Please notify

    The requirement is in reality a quest for the Holy Grail (instantaneous aggregation in the planning of the BSO)?  We could have a conversation down to level 1 "when there is 10 000' options without being noticed.

Maybe you are looking for

  • AD migrate to new hardware?

    Hi, I do a search in AD in Windows 2008 std x 86 migration to new hardware that will run Windows 2008 R2 std x 64. In order to concentrate my research in the right way can you tell me if I have to use ADMT or should I focus my research on something e

  • 5 d Mark 3 low light Images = really slow!

    Hello I have a rather strange problem. When shooting in low light (shots thinking completely black, lightning etc.) 5 d mark iii takes forever to display the image on the preview screen. It takes up to a minute or more, and I can see the flicker of r

  • analyze html

    I want to use labview for download option finance Yahoo or Google finance data and create my own tools for stock trading. Can I use This example to get the html code of Yahoo and Google and extract the information I need. He drop down menus on the We

  • Allow read, write, rename but WITHOUT permissions to remove on Server 2003 R2

    I need a fix for the above, what really works. I tried all the others and they do not work.

  • Latitude 10 - How to remove the battery

    I'm new to this community and using a tablet. My 10 Latitude happened last week, as well as my two spare batteries. (I vacation where there is no power.) But I can't remove the existing battery. The switch moves to half way and the battery didn't bud