Assistance at the request of deletion

Hi all

I have two tables (Table1 and Table2). Both have A varchar fields and B. I would like to delete from table 2 where Table1.A = Table2.A and Table1.B = Table2.B

Can anyone help me please with the syntax?

Thank you

Published by: geeter June 9, 2011 12:06
DELETE FROM table2
 WHERE EXISTS
          (SELECT *
             FROM table1
            WHERE table1.colA = table2.colA
              AND table1.colB = table2.colB)

Tags: Database

Similar Questions

  • Assistance at the request of the LOV

    Hello

    I need assistance with a lov.
    The lov needs to be filled with the separate description of the object values
    I have 3 files in my table

    '1' 'flat roof '.
    '2' "threaded rod.
    '3' 'flat roof '.

    That's why my lov has that 'Flat roof' and 'threaded '.
    I can't understand how to do this in the lov bearing in mind I need a display_value and return_value

    Help, please...

    Hello

    SELECT DISPLAY_VALUE, MIN(RETURN_VALUE) RETURN_VALUE FROM ....GROUP BY DISPLAY_VALUE
    

    Kind regards

  • assistance at the request of insertion

    Hello

    I have a problem in the insertion of value in the table by using the select statement.

    Source table for the air like that

    ACCT eff_date amt
    1 03/04/2012 100
    03/05/2012 1, 200
    03/06/2012 1, 100

    lens table look like this

    ACCT eff_date end_date amt
    1 03/05/2012 100 03/04/2012
    1 03/05/2012 03/06/2012 200
    default value 1 03/06/2012 (12/31/9999) 100

    My query is

    insert into table_tgt
    Select
    ACCT,
    eff_date,
    End_date,
    AMT
    Of
    (
    Select
    ACCT,
    eff_date,
    AMT,
    ROW_NUMBER() over (partition by acct arrested by eff_date): the nurse,.
    Lead (eff_date) over (partition by acct order of eff_date) as end_date
    of table_src
    )


    but the query returns the value as


    ACCT eff_date end_date amt
    1 03/05/2012 100 03/04/2012
    1 03/05/2012 03/06/2012 200
    100 null 1 03/06/2012

    How to get the default value when the value is zero.

    Kindly help.

    Kind regards
    Maëlle

    insert into table_tgt
    Select
    ACCT,
    eff_date,
    End_date,
    AMT
    Of
    (
    Select
    ACCT,
    eff_date,
    AMT,
    ROW_NUMBER() over (partition by acct arrested by eff_date): the nurse,.
    NVL (Lead (eff_date) over (partition by acct arrested by eff_date), to_date (' 31/12/9999 ',' dd/mm/yyyy')) as end_date
    of table_src
    )

  • assistance at the request of aging. don't know how to do this?

    Guys im a bit stuck usually I have a small idea how even start my query but for it that I don't even know where to begin to tackle
    I have a table as follows.
           create table TRRACCD (
           TRRACCD_GRNT_CODE varchar2(6),
           TRRACCD_TRANS_dATE date,
           TRRACCD_AMOUNT number(17,2),
           trraccd_detail_code varchar2(6))
    with the data as follows
    INSERT INTO TRRACCD (TRRACCD_GRNT_CODE, TRRACCD_TRANS_DATE, TRRACCD_AMOUNT, TRRACCD_DETAIL_CODE) VALUES ('400364',to_date('15-FEB-10', 'DD-MM-RR'),19764.77,'GBIL');
    INSERT INTO TRRACCD (TRRACCD_GRNT_CODE, TRRACCD_TRANS_DATE, TRRACCD_AMOUNT, TRRACCD_DETAIL_CODE) VALUES ('400364',to_date('12-MAR-10', 'DD-MM-RR'),2054.29,'GBIL');
    INSERT INTO TRRACCD (TRRACCD_GRNT_CODE, TRRACCD_TRANS_DATE, TRRACCD_AMOUNT, TRRACCD_DETAIL_CODE) VALUES ('400364',to_date('20-APR-10', 'DD-MM-RR'),4111.46,'GBIL');
    INSERT INTO TRRACCD (TRRACCD_GRNT_CODE, TRRACCD_TRANS_DATE, TRRACCD_AMOUNT, TRRACCD_DETAIL_CODE) VALUES ('400364',to_date('14-MAY-10', 'DD-MM-RR'),2570.1,'GBIL');
    INSERT INTO TRRACCD (TRRACCD_GRNT_CODE, TRRACCD_TRANS_DATE, TRRACCD_AMOUNT, TRRACCD_DETAIL_CODE) VALUES ('400364',to_date('10-JUN-10', 'DD-MM-RR'),2176.16,'GBIL');
    INSERT INTO TRRACCD (TRRACCD_GRNT_CODE, TRRACCD_TRANS_DATE, TRRACCD_AMOUNT, TRRACCD_DETAIL_CODE) VALUES ('400364',to_date('12-JUL-10', 'DD-MM-RR'),4756.29,'GBIL');
    INSERT INTO TRRACCD (TRRACCD_GRNT_CODE, TRRACCD_TRANS_DATE, TRRACCD_AMOUNT, TRRACCD_DETAIL_CODE) VALUES ('400364',to_date('13-AUG-10', 'DD-MM-RR'),28500.62,'GCSH');
    INSERT INTO TRRACCD (TRRACCD_GRNT_CODE, TRRACCD_TRANS_DATE, TRRACCD_AMOUNT, TRRACCD_DETAIL_CODE) VALUES ('400364',to_date('16-AUG-10', 'DD-MM-RR'),3602.3,'GBIL');
    INSERT INTO TRRACCD (TRRACCD_GRNT_CODE, TRRACCD_TRANS_DATE, TRRACCD_AMOUNT, TRRACCD_DETAIL_CODE) VALUES ('400364',to_date('17-SEP-10', 'DD-MM-RR'),3995.79,'GBIL');
    INSERT INTO TRRACCD (TRRACCD_GRNT_CODE, TRRACCD_TRANS_DATE, TRRACCD_AMOUNT, TRRACCD_DETAIL_CODE) VALUES ('400364',to_date('11-OCT-10', 'DD-MM-RR'),3413.6,'GBIL');
    INSERT INTO TRRACCD (TRRACCD_GRNT_CODE, TRRACCD_TRANS_DATE, TRRACCD_AMOUNT, TRRACCD_DETAIL_CODE) VALUES ('400364',to_date('11-NOV-10', 'DD-MM-RR'),2119.86,'GBIL');
    INSERT INTO TRRACCD (TRRACCD_GRNT_CODE, TRRACCD_TRANS_DATE, TRRACCD_AMOUNT, TRRACCD_DETAIL_CODE) VALUES ('400364',to_date('10-DEC-10', 'DD-MM-RR'),5905.52,'GBIL');
    INSERT INTO TRRACCD (TRRACCD_GRNT_CODE, TRRACCD_TRANS_DATE, TRRACCD_AMOUNT, TRRACCD_DETAIL_CODE) VALUES ('400364',to_date('10-DEC-10', 'DD-MM-RR'),12008.21,'GBIL');
    INSERT INTO TRRACCD (TRRACCD_GRNT_CODE, TRRACCD_TRANS_DATE, TRRACCD_AMOUNT, TRRACCD_DETAIL_CODE) VALUES ('400364',to_date('11-JAN-11', 'DD-MM-RR'),-10574.05,'GBIL');
    INSERT INTO TRRACCD (TRRACCD_GRNT_CODE, TRRACCD_TRANS_DATE, TRRACCD_AMOUNT, TRRACCD_DETAIL_CODE) VALUES ('400364',to_date('11-JAN-11', 'DD-MM-RR'),20241.9,'GBIL');
    However what I need to do, is ending up with an ageing for elements of sums up so the expected output should be something like
    tbrraccd_grnt_Code      30-60                    60-90         over90 
    400364                      20,241.90              2119.86       7,370.09  
    
    
    if your confused about how i arrived at the 7370.90 is because i have to subtract entries with GCSH on them and i also need to take 
    entries that are - and applied them to the oldest period if the balance of the period is positive. 
    IM inclined to say I can make it work with sql but the only other way I can think of is to use plsql?... any suggestions or solutions would be greatly appreciated.


    the closest I got to acomplishing this query without pl is the following. I know is lame, but I need help.

    SELECT TRRACCD_GRNT_CODE,
           TRRACCD_TRANS_dATE,
           TRRACCD_AMOUNT,
           trraccd_detail_code,
           round(sysdate - TRRACCD_TRANS_dATE) "total days"
           --sum(case when round(sysdate - TRRACCD_TRANS_dATE)>190 then "greater then 190"end )
           FROM TRRACCD
           where trraccd_grnt_Code = '400364'
           ORDER BY TRRACCD_GRNT_CODE,
                    TRRACCD_TRANS_dATE,
                    trraccd_detail_code;   

    Hello

    You may have noticed a resemblance between all these CASE expressions. I think the code easier to debug and maintain if you factored out them like this:

    WITH     got_col_num     AS
    (
         SELECT     trraccd_grnt_code
         ,     CASE
                   WHEN  trraccd_detail_code = 'GCSH'     THEN  -trraccd_amount
                                            ELSE   trraccd_amount
              END          AS net_amount
         ,     trraccd_detail_code
         ,     CASE
                  WHEN  trraccd_amount < 0               THEN  4
                  WHEN  trraccd_trans_date > SYSDATE - 30     THEN  1
                  WHEN  trraccd_trans_date > SYSDATE - 60     THEN  2
                  WHEN  trraccd_trans_date > SYSDATE - 90     THEN  3
                                            ELSE  4
              END          AS col_num
         FROM     trraccd
         WHERE     trraccd_trans_date     <= SYSDATE
    )
    SELECT       trraccd_grnt_code
    ,       SUM (CASE WHEN col_num = 1 THEN net_amount END)     AS "0-29"
    ,       SUM (CASE WHEN col_num = 2 THEN net_amount END)     AS "30-59"
    ,       SUM (CASE WHEN col_num = 3 THEN net_amount END)     AS "60-89"
    ,       SUM (CASE WHEN col_num = 4 THEN net_amount END)     AS "90 and over"
    FROM       got_col_num
    GROUP BY  trraccd_grnt_code
    ORDER BY  trraccd_grnt_code
    ;
    

    Output (similar to the last output above):

    TRRACC       0-29      30-59      60-89 90 and over
    ------ ---------- ---------- ---------- -----------
    400364    20241.9   17913.73    2119.86     7370.09
    
  • Assistance at the request of PE7 chronology

    Hello

    I'm new to elements, normally work in Premiere Pro CS3.  I bought PE7 to manage the AVCHD for recreation.  When I add AVCHD media to the timeline, he place the clips on the track of V4 and no video 1 and I can not move the media 4-to-1.  As in Pro standard set tracks are set to 3?  Why the elements automatically sets new media on a new track of 4th?  Even if I start with the timeline and move to the chronology of its yet on track 4!   the following clips are added to a new track 5, 6, 7 etc... I'm obviously blinded by the use of CS3, but something in PE7 evil?

    Any help will be appreciated.  Thank you

    Check out this thread, it should answer your question:

    http://forums.Adobe.com/message/1762493#390370

    Question revolves around none have the right pre-set your attempt to load in PE for the media.

    I know no other sounds to which have been down this road...

  • Assistance at the request of HIERARCHICAL tree

    Hi friends,
    How can given any level below the top of the page, we find the top level most of any query structured tree?

    Thank you

    Hello

    ILovePlSql wrote:
    Hi friends,
    How can given any level below the top of the page, we find the top level most of any query structured tree?

    Thank you

    Sorry, I don't know what you're asking.

    Whenever you have a querstion, post a small example of data (CREATE TABLE and INSERT statements) and the results desired from these data.
    If you can frame the issue using tables commonly available (such as in the diagrams of scott or HR) so you don't have to display the sample data.
    If the query includes parameters, give a few sets of parameters and the desired results of each.

    A better question would be:
    "In table scott.emp, how can I find the empno of the ancesestor above (manager, or Manager of the Manager or manager of this person: one who is not himself a Manager) empno data?
    I know that KING (empno = 7839) is be the root of the entire table, he given any empno (like 7499, 7521 or 7900), the query should return 7839.
    For example, the Manager of 7900 is 7698 and Manager of 7698 is 7839 and 7839 has no Manager, thus data entry 7900, the output should be 7839. How can I do that in a single query? »

    If this is your question, then do a query from the bottom up , ike:

    SELECT  empno
    FROM    scott.emp
    WHERE   CONNECT_BY_ISLEAF = 1
    START WITH  empno  = 7900   -- or any empno
    CONNECT BY  empno  = PRIOR mgr
    ;
    

    You're porbably more familiar with queries from top to bottom , to help

    CONNECT BY  PRIOR empno  = mgr
    

    To travel through the shaft in the other direction, simply apply before the other column.

    Published by: Frank Kulash, March 25, 2010 17:21

  • I deleted my account on a site I'm going and it keeps saing that Firefox has detected that the server redirects the request for this address in a way that doesn't

    He repeated to me that Firefox has detected that the server redirects the request for this address in a way that will never end.

     This problem can sometimes be caused by disabling or refusing to accept
       cookies.
    

    Have you tried to clear the cache and cookies?

    Clear the cache and cookies from sites that cause problems.

    "Clear the Cache":

    • Tools > Options > advanced > network > content caching Web: 'clear now '.

    'Delete Cookies' sites causing problems:

    • Tools > Options > privacy > Cookies: "show the Cookies".

    See also:

  • How to disable", or delete the"reporter"on the request of encryption screen?

    Original title:

    BitLocker

    Does anyone know if it is possible to 'disable' or delete the "reporter" on the request screen encryption?

    Hi Natheem,

    When users log on a computer that must be encrypted, they receive a notification that their computer will be encrypted. They can select request Exemption and postpone the encryption by selecting future releases or start accepting the BitLocker encryption.

    For more information, refer to:

    To get help after the question on Bitlocker TechNet forums:

    http://social.technet.Microsoft.com/forums/en-us/home?Forum=mdopmbam

    Hope the helps of information. Please let us know if you need help on this issue or any problem related to Windows.

  • Firefox would take me to yahoo, but now he says sorry gone the requested resource is no longer available on this server and there is no forwarding address.

    When I click on my Firefox icon instead of coming yahoo I get a page that says 410 Gone. Sorry, gone the requested resource is no longer available on this server and there is no forwarding address. Remove all references to this resource. Please check the URL for proper spelling and capitalization. If you're having trouble finding a destination on yahoo try to visit the 'Yahoo homepage"or browse a list of Yahoo online services. Also, you can find what you're looking for if you try searching below (it gives a lookup field). Under the box it says please try Yahoo help center if you need further help. If I click on the homepage of Yahoo words, it will take me to the homepage of yahoo, which is used to make my my just by clicking on the icon of my Firefox. I'd appreciate any help anyone could give me. I deleted Firefox to my computer and re-uploaded with yahoo download but always the same screen when I click on the Firefox icon.

    Try resetting your homepage.

    https://support.Mozilla.org/en-us/KB/how%20To%20set%20The%20home%20page

  • Firefox has detected that the server redirects the request for this address in a way that will never end.

    This week (01/10/12) I registered on youtube and now I can't log back in here or in my gmail account. I tried every fix-it/single remedy offered the FF forum but nothing works.

    Any other work, all the sites that I frequent load fine, is youtube doing something on purpose for FF users? I can get the page youtube videos and see, but I can't log on, every time I click the sign in button, I get:

    "The page is not redirecting properly".

    Firefox has detected that the server is redirecting the request for this address in a way that will never complete.
    

    This problem can sometimes be caused by disabling or refusing to accept cookies. »

    I hate to be a conspiracy theorist, I can connect to youtube without problem on IE, but I hate this browser. I use windows 7 and 15 FF. Can someone find it?

    Looks like it's a firefox issue, because that never happened on IE, Safari or Opera on me.
    You think not that a simple patch can solve this problem. I have to delete individual cookies every day.

  • all the site went "not found HTTP 404 error. The requested resource is not found. "and the"Firefox cannot load Web sites but other programs can"page is not helping

    all the site went "not found HTTP 404 error. The requested resource is not found. "and the"Firefox cannot load Web sites but other programs can"page is not help somehow

    One possible cause is security software (firewall, antivirus) that prevents or limits Firefox or plugin-container process without informing you, possibly after the detection of changes (update) for the Firefox program.

    Delete all rules for Firefox and the plugin-container in the permissions list in the firewall and leave your firewall again ask permission to get full unlimited access to the internet for Firefox and the plugin-container and the update process.

    See:

    You can try to reset (power off / on) of the router.

  • Cannot log on to Twitter. I get 403 Forbidden: the server understood the request, but refuses to fill. »

    When I try to log on to Twitter, I get the error message below.

    403 Forbidden: the server understood the request, but refuses to fill.

    Seems to emerged since I have updated to Firefox... I think so...

    You can manually connect on Twitter by removing cookies from twitter. Click on "Firefox" at the top left, and then choose 'Options '. Click on the "Privacy" tab and click on 'delete cookies '. In the list, scroll down to twitter.com and click on 'Delete the Cookies' I hope this helps. Regarding the 403 error, it is usually caused by a typing error in the address bar, or with a failure on the Twitter servers.

  • I can't open my email on Firefox, it works on explore. When you go to the page I get this message "the requested URL /hunter/ajax_login/redirect.php was not found on this server."

    Question
    I can't open my email on Firefox, it works on explore. When you go to the page I get this e message "the requested URL /hunter/ajax_login/redirect.php is not found on this server."

    Reload Web pages, and ignore the cache.

    • Hold SHIFT and click reload.
    • Press 'Ctrl + F5' or 'Ctrl + Shift + R' (Windows, Linux)
    • Press 'Cmd + Shift + R' (MAC)

    Clear the cache and cookies from sites that cause problems.

    "Clear the Cache":

    • Tools > Options > advanced > network > storage (Cache) offline: 'clear now '.

    'Delete Cookies' sites causing problems:

    • Tools > Options > privacy > Cookies: "show the Cookies".
  • access code will work no - has rejected the correct password, deleted the data

    Hi people

    Had a problem with the iPhone OS 9.3.1 (6 s)

    The password was rejected, even if she did the same every time: it worked randomly.  This question has followed a request to change the password to another.  I put in an alphanumeric password with a special character, as he refused to let me use the previous password.

    I tried to change the password but failed at each point and wouldn't let me delete the iPhone either.  He decided to spontaneously clear the data while it was in my pocket.

    I restored the iPhone and will monitor.

    I was wondering if anyone else has had this problem and it could be a virus or something.  Could it be spyware? Or simply corrupted software?

    Your thoughts appreciated

    Unless your phone has been jailbroken (and I doubt it was) it wouldn't get a virus.

    It's a working phone? Is there an exchange account or an email from work?

    The request came via a pop-up of Safari?

    If the request came from Safari, I would follow the steps below. If it's a working phone that I would like to talk to your people in TI.

    Close Safari completely from the window of the selector app by double clicking the Home button and slide up the preview pane of Safari until it disappears from the display. You may need to search the Safari part covering scribbles to the left. Then go to settings > Safari > clear the history and data from the Web site. Then perform a forced reboot. Hold down the Home and Sleep/Wake buttons simultaneously for about 15-20 seconds, until the Apple logo appears.

  • Firefox has detected that the server redirects the request for this address in a way that will never end. I followed your instructions and nothing works. This just started happening today.

    I was watching www.ustream.tv/decoraheagles for months. I started using Firefox about a month ago. Earlier today, when I tried connecting to the site, I received the message "Firefox has detected that the server redirects the request for this address in a way that will never end."
    I went on your site and follow the instructions. This Web site was not in the blocked sites. He told me how to add it, and I did.
    She still refuses to open this site.
    Internet Explorer WILL open this site.

    Clear the cache and cookies from sites that cause problems.

    "Clear the Cache":

    • Tools > Options > advanced > network > storage (Cache) offline: 'clear now '.

    'Delete Cookies' sites causing problems:

    • Tools > Options > privacy > Cookies: "show the Cookies".

Maybe you are looking for

  • Can't send or receive E mails

    In the last two weeks, I have not been able to send or receive emails from my Hotmail on my I Phone 6 account. I can still receive and send emails to my I Mac and my I Pad. I have checked my incoming and out going servers and they seem to agree. Alth

  • IPod not connecting to iTunes

    My IPod is not connecting to iTunes... I have tried everything uninstalled reinstalled several times, reset my ipod to factory settings, the lot and ITunes still does not recognize my Ipod... In also spent more than three hours on thephone to the App

  • LabVIEW 8.6.1 - message builder vi is password protected

    I am new to Labview 8.6.1 and I get a few messages I can't explain why. Labview is the construction of an executable, I have a few messages such as the one displayed in attachment. The messages are associated with the screws that are part of the Labv

  • Upgrading EBS 12.0.6 on DB 10.2.0.2 to EBS 12.1.3 on DB 11.2.0.3

    Dear,Please provide me with all stages of modernization 12.0.6 on DB 10.2.0.2 EBS EBS 12.1.3 on DB 11.2.0.3?Kind regards

  • Compaq 620 q: another registration site

    the site https://nortonactivate.com/compaign/fm1301 does not work. any other registration site please.