Delete statement help

Hi all

In the table of audit_organizations_test, I want to delete all records except those returned returned in the following select statement:
select *
      from audit_organizations_test ao
      where last_updt_date >= '01-jan-2008'
      union
      select *
      from (select *
          from audit_organizations_test ao
          where org_id not in (select aoo.org_id
                              from audit_organizations_test aoo
                           where aoo.last_updt_date >= '01-jan-2008')
           ) x
      where x.last_updt_date = (select max(ao1.last_updt_date)
                               from audit_organizations_test ao1
                             where x.org_id = ao1.org_id
How can I dial a delete statement to do this?

Thank you.

Hello

delete from audit_organizations_test where rowid not in
(select rowid from audit_organizations_test ao
      where last_updt_date >= '01-jan-2008'
      union
      select *
      from (select *
          from audit_organizations_test ao
          where org_id not in (select aoo.org_id
                              from audit_organizations_test aoo
                           where aoo.last_updt_date >= '01-jan-2008')
           ) x
      where x.last_updt_date = (select max(ao1.last_updt_date)
                               from audit_organizations_test ao1
                             where x.org_id = ao1.org_id
)

Concerning
Anurag

Tags: Database

Similar Questions

  • Need help to set a DELETE statement.

    I have a table that contains the records of files. Files come in a bouquet each week. So, we need to delete records from a table to the corresponding fields and load the table with up-to-date data.

    In doing so, the DELETE statement takes a long time. Need help with this setting.

    Here are the details.

    (1) total number of records in the table: 23 million records.
    (2) approximate records deleted each time: 500 K to 1.5 million.
    (3) table is partitioned on a PERIOD key. That is, each partition will have the data for a given period.
    (4) table is not indexed
    (5) removal occurs on a combination of 2 fields (PERIOD + BATCH).

    Here is the query and the plan:

    ===========================================================

    SQL > EXPLAIN PLAN SET STATEMENT_ID = 'TSH' FOR
    2 REMOVE / * + PARALLEL(DETAIL_UNKNOWN,10) * / u DETAIL_UNKNOWN
    3 WHERE u.FLBATCHID = 'PCAFRINTERMAR1105' AND u.N_PER6 = 201214
    4;

    He explained.

    SQL > SET LINESIZE 130
    SQL > SELECT * FROM TABLE (DBMS_XPLAN. DISPLAY ('PLAN_TABLE', 'TSH', 'ALL'));

    PLAN_TABLE_OUTPUT
    ----------------------------------------------------------------------------------------------------
    Hash value of plan: 2400300449

    ----------------------------------------------------------------------------------------------------
    | ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time | Pstart. Pstop |
    ----------------------------------------------------------------------------------------------------
    | 0 | DELETE STATEMENT. 596K | 12 M | 838 (9) | 00:00:12 |
    | 1. REMOVE | DETAIL_UNKNOWN |
    | 2. SIMPLE HASH PARTITION | 596K | 12 M | 838 (9) | 00:00:12 | 6. 6.
    |* 3 | TABLE ACCESS FULL | DETAIL_UNKNOWN | 596K | 12 M | 838 (9) | 00:00:12 |
    ----------------------------------------------------------------------------------------------------


    PLAN_TABLE_OUTPUT
    ----------------------------------------------------------------------------------------------------
    Name of the query block / Alias object (identified by the operation identity card):
    -------------------------------------------------------------

    1 LED$ 1
    3 LED$ 1 / U@DEL$1

    Information of predicates (identified by the operation identity card):
    ---------------------------------------------------

    3 - filter("U".") FLBATCHID '= 'PCAFRINTERMAR1105' AND 'U'." N_PER6 "= 201214)


    PLAN_TABLE_OUTPUT
    ----------------------------------------------------------------------------------------------------
    Projection of the column information (identified by the operation identity card):
    -----------------------------------------------------------

    2 - (cmp = 2, 3) "U". ROWID [ROWID, 10], "U". "N_PER6" [NO.22], 'U' "." " FLBATCHID ' [VARCHAR2, 20].
    3 - « U ». ROWID [ROWID, 10], "U". "N_PER6" [NO.22], 'U' "." " FLBATCHID ' [VARCHAR2, 20].

    27 selected lines.

    ===========================================================

    Need your suggestions on how the query / table can be tuned.

    Hi Anand,

    I wanted to check why your tkprof Watch report two executions of the statement:

    call     count       cpu    elapsed       disk      query    current        rows
    ------- ------  -------- ---------- ---------- ---------- ----------  ----------
    Execute      2   2315.71    2480.17          0       3351     624489      611765
    

    In fact, it there was only a single execution of the DELETE statement. The trace file begins with a call EXEC of any statement without call analysis

    *** TRACE DUMP CONTINUED FROM FILE XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX_ora_241708.trc ***
    
    EXEC #1:c=20000,e=13996,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=0,tim=32472879711702
    =====================
    PARSING IN CURSOR #2 len=68 dep=0 uid=72 oct=42 lid=72 tim=32472883567994 hv=740818757 ad='0'
    ...
    

    TKProf aggregates this EXEC call with call EXEC of the DELETE statement because they have the same location of cursor (#1), he thinks it was the same cursor.

    PARSING IN CURSOR #1 len=93 dep=0 uid=72 oct=7 lid=72 tim=32472889974030 hv=1242910589 ad='e5979d80'
    DELETE from detail_unknown where n_per6 = 201214 and FLBATCHID = 'PCAFRINTERMAR1105'
    END OF STMT
    PARSE #1:c=0,e=11462,p=0,cr=0,cu=0,mis=1,r=0,dep=0,og=1,tim=32472889974024
    ...
    EXEC #1:c=2315710000,e=2480213492,p=0,cr=3691,cu=624489,mis=0,r=611765,dep=0,og=1,tim=32475370187626
    

    So, the question about two executions is closed - there was only a single run.

    The performance - 2315,71 seconds of time processor is absolutely huge for such amount of work. It looks like a bug.

    First, I propose to check the time without compression. If your environment allows this kind of testing try to decompress the partition and re - run on unpacking data DELETION.
    10.2 find the name of the partition

    select partition_name
      from dba_tab_partitions
     where table_name = 'DETAIL_UNKNOWN'
       and partition_position = 6
    

    After that

    alter table DETAIL_UNKNOWN modify partition  nocompress;
    alter table DETAIL_UNKNOWN move partition ;
    

    and run again the button DELETE.

    What is the operating system on the server?

  • When I opened outlook express Inbox, all messages have been deleted, please help restore the same

    When I opened outlook express Inbox, all messages have been deleted, please help restore the same

    Go to view | Current view | Show all messages to make sure that you have just selected 'Hide read messages.

    If this does not help, check your Recycle Bin, the bak files which are dbx files, you can restore backups.  See www.oehelp.com/OETips.aspx#2

    If this does not help, then you will probably need my program DBXpress (www.oehelp.com/DBXpress/), which will extract the messages from individual dbx files, and if messages are no longer in the files, it can extract from the disc itself.

    Steve

  • I can't delete an e-mail in the Outbox, I right click and you press DELETE nothing helps

    I can't delete an e-mail in the Outbox, I right click and you press DELETE nothing helps

    What should I do?

    If she is trying to send, you must check first to work offline and then it should delete.

  • Dictionary stats help?

    DBA dear friends,

    In my 11.1.0.7 database, I have an ID of SQL which contributes about 100 reads physical Mil a day in the database, he ran 85 times in the 24 hour period.

    Here is the SQL - it accesses the SYSTEM tables and EM monitors query type, and is not a request part of the application-

    Dictionary collection stats help reduced the physical reads? Or any other point of view that what must be considered?

    Is it still worth to try tuning the query?  Please share your entries...

    SELECT 'AQ_Messages_in_Expired' t. *
    Of
    (select q. owner | | '.' | | q . name , v. expired
    de v$aq v, dba_queues q

    v. QID = q. QID and q. owner not in ('SYS','SYSTEM','WMSYS') and q. QID not in (206397, 206398, 206325)) t

    I don't see a MERGE JOIN CARTESIAN, which is good.  I do not see a stage for fixed table and it MIGHT help generate fixed objects statistics:

    exec dbms_stats.gather_fixed_objects_stats (null)

    You can see if they have been already generated by querying the SYS. TAB_STATS$:

    Select count (*) in the sys.tab_stats$;

    If it is empty then stats fixed objects have not been met.  Stats of $ service must be collected by the work of database statistics 'standard '.  You can collect these stats and run the query again to see if the run time is improving.  You can also check when the last statistics, what are the sample sizes and how closely NUM_ROWS agrees with a count (*) current tables questioned.

    David Fitzjarrell

  • Adobe illustrator app does not download on my ipad air 2 more. Operating system is uptodate. Will not let me delete. Help available?

    Adobe illustrator app does not download on my ipad air 2 more. Operating system is uptodate. Will not let me delete. Help available?

    Hi Trimmertop,

    Have you tried to reboot your iPhone and then retry installing? If you have and which did not work, have you tried a forced restart of the phone?

    Sue.

  • [CORRECTION] Optional clause in the DELETE statements.

    Hello

    I have always used the FROM clause in a delete statement.

    Delete * from TableName.

    Now I'm confused, is optional FROM?

    Delete TableName is equivalent to Delete * from Tablename?

    user12022313 wrote:
    Hello

    I have always used the FROM clause in a delete statement.

    Delete * from TableName.

    Now I'm confused, is optional FROM?

    Yes, it is not compulsory.
    >

    Delete TableName is equivalent to Delete * from Tablename?

    It is equivalent, but would be better coded as

    TRUNCATE TABLE TableName
    
  • Delete statement does not work properly

    Hello

    The following delete statement does not work correctly.
    If I press DELETE will delete everything in the table of categories
    I don't know whats wrong with it.
    -Delete category line if there is not the infrastructure to support-
    IF: P12_DFCY_SEQNO4 IS NOT NULL AND: P12_DFCY_CATG_C = "7" THEN
    REMOVE FROM DFCY_CATG
    IF NOT EXISTS (SELECT I.DFCY_SEQNO
    OF DFCY_CATG C, DFCY_CATG_INFRSTRCTR I
    WHERE C.DFCY_SEQNO = I.DFCY_SEQNO
    AND: P12_DFCY_SEQNO4 = I.DFCY_SEQNO);
    end if;

    Thank you
    Mary

    You probably the where more clause:

    DELETE FROM DFCY_CATG
    WHERE C.DFCY_SEQNO = :P12_DFCY_SEQNO4
    AND NOT EXISTS(SELECT I.DFCY_SEQNO
    FROM DFCY_CATG C, DFCY_CATG_INFRSTRCTR I
    WHERE C.DFCY_SEQNO = I.DFCY_SEQNO
    AND :P12_DFCY_SEQNO4 = I.DFCY_SEQNO);
    

    Not sure if this is the exact name of your column in the table, but that limit the scope of deleting just a record that you control.

    Hope it will be useful,

    Aaron

  • DEADLOCK DETECTED - DELETE statement - how/why he expects in SHARING mode?

    Hello

    I wonder if anyone can advise here. The environment is:

    Microsoft Windows 2003 Server
    Standard Oracle 10.2.0.4 Edition

    We had a deadlock detected in our application on a customer site - I enclose the corresponding part of the trace file below. While we think we have found the reason for the deadlock (looks like it is due to a foreign key in cascade), I'm confused as the lock mode that is requested.

    Here is the track information:
    Deadlock graph:
                           ---------Blocker(s)--------  ---------Waiter(s)---------
    Resource Name          process session holds waits  process session holds waits
    TX-00120012-00003b59        28     475     X             29     481           S
    TX-000a0029-0003508b        29     481     X             28     475           X
    session 475: DID 0001-001C-000F96B0     session 481: DID 0001-001D-00000079
    session 481: DID 0001-001D-00000079     session 475: DID 0001-001C-000F96B0
    Rows waited on:
    Session 481: no row
    Session 475: obj - rowid = 00014625 - AAAUYlAAIAAAAawAAo
      (dictionary objn - 83493, file - 8, block - 1712, slot - 40)
    Information on the OTHER waiting sessions:
    Session 481:
      pid=29 serial=18261 audsid=202192707 user: 51/info
      O/S info: user: SYSTEM, term: our_term, ospid: 5244:940, machine: our_machine
                program: our_exe.exe
      client info: GUI
      application name: app, hash value=3864155245
      action name: our_action, hash value=3631189430
      Current SQL Statement:
      DELETE FROM TABLE_1 T WHERE T.T_ID = :B1
    End of information on OTHER waiting sessions.
    Current SQL statement for this session:
    UPDATE TABLE_1 T SET T.STATUS_ID = :B2 WHERE T.T_ID = :B1 
    It seems to me like session * 481 * trying to do a deletion when the block is raised:
     DELETE FROM TABLE_1 T WHERE T.T_ID = :B1
    and ask which mode (dynamique31) S .
                                       ---------Blocker(s)--------  ---------Waiter(s)---------
    Resource Name          process session holds waits  process session holds waits
    TX-00120012-00003b59        28     475     X             29     481           S
    (also the 'no line' for lines didn't wait)
    Session 481: no row
    I thought it would be in mode (e) X (clusive) (for the line being deleted). Actually Yes, I set up a test of fast and simple locking and mode (e) X (is) expected the final delete .

    So, am I misinterpreted the tracing information, or is the DELETE statement requesting the lock in mode S (Hare)? If this is the case, I'd appreciate a quick explanation of how/why it's...



    Kind regards

    ADOS

    I think we have almost the same reason to wait in S mode as in [single key application | http://books.google.pl/books?id=14OmJzfCfXMC&dq=oracle+wait+interface+practical+guide&q=unique+key+enforcement].
    If two sessions want to insert the same key value, the other must wait, because the outcome depends on a commit / rollback of the first session. In the case of validation, session 2 must generate an error in case of cancellation, it must insert his record.

    In the test provided by ADOS, at session 1 there is an insert in session 2 - delete. The result of the delete operation depends, once again, commit or rollback in the first session. In the case of validation, it must remove, and cancellations, there is nothing to remove.

    If the insert in session 1 has been replaced by the Update, there is no S lock but 'normal' eXclusive

    Bartek

  • Help delete statement

    Hi all
    We have the following text:
    create table tt1 (c1 varchar2(10), c2 varchar2(10));
    
    insert into tt1 values('AA','11');
    insert into tt1 values('AA','11');
    insert into tt1 values('AA','11');
    insert into tt1 values('AA','11');
    insert into tt1 values('AA','11');
    insert into tt1 values('BB','22');
    insert into tt1 values('BB','22');
    insert into tt1 values('BB','22');
    insert into tt1 values('BB','22');
    I want to remove expandable lines... If the output should be:

    AA 11
    BB 22


    and other lines to remove. We don't have a singularity.
    Any ideas?


    Version: 10g



    Thanks in advance,
    Bahchevanov.

    There are several methods:

    AskTom: Duplicate deletion of records
    AskTom: Duplicate deletion of records without using rowid, and rownum
    AskTom: to remove duplicate records

  • simple help with a delete statement

    Hello guys
    I have a table like this
    CREATE TABLE FWENCUM
      (
        "FWENCUM_FUND"            VARCHAR2(6 BYTE),
        "FWENCUM_GRNT"            VARCHAR2(9 BYTE),
        "FWENCUM_ORG"             VARCHAR2(6 BYTE),
        "FWENCUM_PROG"            VARCHAR2(6 BYTE),
        "FWENCUM_ACCT"            VARCHAR2(6 BYTE),
        "FWENCUM_ACTV"            VARCHAR2(6 BYTE),
        "FWENCUM_LOCN"            VARCHAR2(6 BYTE),
        "FWENCUM_INDCOST_BUDGET"  NUMBER(17,2),
        "FWENCUM_GRANT_TOTAL"     NUMBER(17,2),
        "FWENCUM_FUND_TOTAL"      NUMBER(17,2),
        "FWENCUM_BUDGET_FUND"     NUMBER(17,2),
        "FWENCUM_YTD_FUND"        NUMBER(17,2),
        "FWENCUM_INDCOST_YTD"     NUMBER(17,2),
        "FWENCUM_INDCOST_COMM"    NUMBER(17,2),
        "FWENCUM_ERROR"           VARCHAR2(2 BYTE),
        "FWENCUM_AMOUNT_ENCUMBER" NUMBER(17,2)
      )
    with these values
    REM INSERTING into FWENCUM
    Insert into FWENCUM (FWENCUM_FUND,FWENCUM_GRNT,FWENCUM_ORG,FWENCUM_PROG,FWENCUM_ACCT,FWENCUM_ACTV,FWENCUM_LOCN,FWENCUM_INDCOST_BUDGET,FWENCUM_INDCOST_YTD,FWENCUM_INDCOST_COMM,FWENCUM_GRANT_TOTAL,FWENCUM_FUND_TOTAL,FWENCUM_BUDGET_FUND,FWENCUM_YTD_FUND,FWENCUM_ERROR,FWENCUM_AMOUNT_ENCUMBER) values ('240051','240051','07171','01','7623',' ',' ',131635,34865.08,96873.92,-104,null,null,null,null,-104);
    Insert into FWENCUM (FWENCUM_FUND,FWENCUM_GRNT,FWENCUM_ORG,FWENCUM_PROG,FWENCUM_ACCT,FWENCUM_ACTV,FWENCUM_LOCN,FWENCUM_INDCOST_BUDGET,FWENCUM_INDCOST_YTD,FWENCUM_INDCOST_COMM,FWENCUM_GRANT_TOTAL,FWENCUM_FUND_TOTAL,FWENCUM_BUDGET_FUND,FWENCUM_YTD_FUND,FWENCUM_ERROR,FWENCUM_AMOUNT_ENCUMBER) values ('420461','420420','04720','02','7623',' ',' ',15600,12287.6,0,124783.52,null,null,null,null,3312.4);
    Insert into FWENCUM (FWENCUM_FUND,FWENCUM_GRNT,FWENCUM_ORG,FWENCUM_PROG,FWENCUM_ACCT,FWENCUM_ACTV,FWENCUM_LOCN,FWENCUM_INDCOST_BUDGET,FWENCUM_INDCOST_YTD,FWENCUM_INDCOST_COMM,FWENCUM_GRANT_TOTAL,FWENCUM_FUND_TOTAL,FWENCUM_BUDGET_FUND,FWENCUM_YTD_FUND,FWENCUM_ERROR,FWENCUM_AMOUNT_ENCUMBER) values ('420462','420420','04330','02','7623',' ',' ',15600,7372.56,0,124783.52,null,null,null,null,8227.44);
    Insert into FWENCUM (FWENCUM_FUND,FWENCUM_GRNT,FWENCUM_ORG,FWENCUM_PROG,FWENCUM_ACCT,FWENCUM_ACTV,FWENCUM_LOCN,FWENCUM_INDCOST_BUDGET,FWENCUM_INDCOST_YTD,FWENCUM_INDCOST_COMM,FWENCUM_GRANT_TOTAL,FWENCUM_FUND_TOTAL,FWENCUM_BUDGET_FUND,FWENCUM_YTD_FUND,FWENCUM_ERROR,FWENCUM_AMOUNT_ENCUMBER) values ('420456','420420','23040','02','7623',' ',' ',26000,5810.01,0,124783.52,null,null,null,null,20189.99);
    Insert into FWENCUM (FWENCUM_FUND,FWENCUM_GRNT,FWENCUM_ORG,FWENCUM_PROG,FWENCUM_ACCT,FWENCUM_ACTV,FWENCUM_LOCN,FWENCUM_INDCOST_BUDGET,FWENCUM_INDCOST_YTD,FWENCUM_INDCOST_COMM,FWENCUM_GRANT_TOTAL,FWENCUM_FUND_TOTAL,FWENCUM_BUDGET_FUND,FWENCUM_YTD_FUND,FWENCUM_ERROR,FWENCUM_AMOUNT_ENCUMBER) values ('420421','420420','04100','02','7623',' ',' ',15600,12287.6,0,124783.52,null,null,null,null,3312.4);
    Insert into FWENCUM (FWENCUM_FUND,FWENCUM_GRNT,FWENCUM_ORG,FWENCUM_PROG,FWENCUM_ACCT,FWENCUM_ACTV,FWENCUM_LOCN,FWENCUM_INDCOST_BUDGET,FWENCUM_INDCOST_YTD,FWENCUM_INDCOST_COMM,FWENCUM_GRANT_TOTAL,FWENCUM_FUND_TOTAL,FWENCUM_BUDGET_FUND,FWENCUM_YTD_FUND,FWENCUM_ERROR,FWENCUM_AMOUNT_ENCUMBER) values ('420422','420420','06370','02','7623',' ',' ',31200,27066.52,0,124783.52,null,null,null,null,4133.48);
    Insert into FWENCUM (FWENCUM_FUND,FWENCUM_GRNT,FWENCUM_ORG,FWENCUM_PROG,FWENCUM_ACCT,FWENCUM_ACTV,FWENCUM_LOCN,FWENCUM_INDCOST_BUDGET,FWENCUM_INDCOST_YTD,FWENCUM_INDCOST_COMM,FWENCUM_GRANT_TOTAL,FWENCUM_FUND_TOTAL,FWENCUM_BUDGET_FUND,FWENCUM_YTD_FUND,FWENCUM_ERROR,FWENCUM_AMOUNT_ENCUMBER) values ('420423','420420','23050','02','7623',' ',' ',15600,10171.91,0,124783.52,null,null,null,null,5428.09);
    Insert into FWENCUM (FWENCUM_FUND,FWENCUM_GRNT,FWENCUM_ORG,FWENCUM_PROG,FWENCUM_ACCT,FWENCUM_ACTV,FWENCUM_LOCN,FWENCUM_INDCOST_BUDGET,FWENCUM_INDCOST_YTD,FWENCUM_INDCOST_COMM,FWENCUM_GRANT_TOTAL,FWENCUM_FUND_TOTAL,FWENCUM_BUDGET_FUND,FWENCUM_YTD_FUND,FWENCUM_ERROR,FWENCUM_AMOUNT_ENCUMBER) values ('420424','420420','04340','02','7623',' ',' ',15600,0,0,124783.52,null,null,null,null,15600);
    Insert into FWENCUM (FWENCUM_FUND,FWENCUM_GRNT,FWENCUM_ORG,FWENCUM_PROG,FWENCUM_ACCT,FWENCUM_ACTV,FWENCUM_LOCN,FWENCUM_INDCOST_BUDGET,FWENCUM_INDCOST_YTD,FWENCUM_INDCOST_COMM,FWENCUM_GRANT_TOTAL,FWENCUM_FUND_TOTAL,FWENCUM_BUDGET_FUND,FWENCUM_YTD_FUND,FWENCUM_ERROR,FWENCUM_AMOUNT_ENCUMBER) values ('420451','420420','23050','02','7623',' ',' ',26000,24078.7,0,124783.52,null,null,null,null,1921.3);
    Insert into FWENCUM (FWENCUM_FUND,FWENCUM_GRNT,FWENCUM_ORG,FWENCUM_PROG,FWENCUM_ACCT,FWENCUM_ACTV,FWENCUM_LOCN,FWENCUM_INDCOST_BUDGET,FWENCUM_INDCOST_YTD,FWENCUM_INDCOST_COMM,FWENCUM_GRANT_TOTAL,FWENCUM_FUND_TOTAL,FWENCUM_BUDGET_FUND,FWENCUM_YTD_FUND,FWENCUM_ERROR,FWENCUM_AMOUNT_ENCUMBER) values ('420452','420420','22070','02','7623',' ',' ',26000,4050.97,0,124783.52,null,null,null,null,21949.03);
    Insert into FWENCUM (FWENCUM_FUND,FWENCUM_GRNT,FWENCUM_ORG,FWENCUM_PROG,FWENCUM_ACCT,FWENCUM_ACTV,FWENCUM_LOCN,FWENCUM_INDCOST_BUDGET,FWENCUM_INDCOST_YTD,FWENCUM_INDCOST_COMM,FWENCUM_GRANT_TOTAL,FWENCUM_FUND_TOTAL,FWENCUM_BUDGET_FUND,FWENCUM_YTD_FUND,FWENCUM_ERROR,FWENCUM_AMOUNT_ENCUMBER) values ('420453','420420','18350','02','7623',' ',' ',26000,9502.1,0,124783.52,null,null,null,null,16497.9);
    Insert into FWENCUM (FWENCUM_FUND,FWENCUM_GRNT,FWENCUM_ORG,FWENCUM_PROG,FWENCUM_ACCT,FWENCUM_ACTV,FWENCUM_LOCN,FWENCUM_INDCOST_BUDGET,FWENCUM_INDCOST_YTD,FWENCUM_INDCOST_COMM,FWENCUM_GRANT_TOTAL,FWENCUM_FUND_TOTAL,FWENCUM_BUDGET_FUND,FWENCUM_YTD_FUND,FWENCUM_ERROR,FWENCUM_AMOUNT_ENCUMBER) values ('420454','420420','04340','02','7623',' ',' ',26000,426.38,0,124783.52,null,null,null,null,25573.62);
    Insert into FWENCUM (FWENCUM_FUND,FWENCUM_GRNT,FWENCUM_ORG,FWENCUM_PROG,FWENCUM_ACCT,FWENCUM_ACTV,FWENCUM_LOCN,FWENCUM_INDCOST_BUDGET,FWENCUM_INDCOST_YTD,FWENCUM_INDCOST_COMM,FWENCUM_GRANT_TOTAL,FWENCUM_FUND_TOTAL,FWENCUM_BUDGET_FUND,FWENCUM_YTD_FUND,FWENCUM_ERROR,FWENCUM_AMOUNT_ENCUMBER) values ('420455','420420','09060','02','7623',' ',' ',26000,1561.25,0,124783.52,null,null,null,null,24438.75);
    Insert into FWENCUM (FWENCUM_FUND,FWENCUM_GRNT,FWENCUM_ORG,FWENCUM_PROG,FWENCUM_ACCT,FWENCUM_ACTV,FWENCUM_LOCN,FWENCUM_INDCOST_BUDGET,FWENCUM_INDCOST_YTD,FWENCUM_INDCOST_COMM,FWENCUM_GRANT_TOTAL,FWENCUM_FUND_TOTAL,FWENCUM_BUDGET_FUND,FWENCUM_YTD_FUND,FWENCUM_ERROR,FWENCUM_AMOUNT_ENCUMBER) values ('420460','420420','04310','02','7623',' ',' ',15600,12287.6,0,124783.52,null,null,null,null,3312.4);
    Insert into FWENCUM (FWENCUM_FUND,FWENCUM_GRNT,FWENCUM_ORG,FWENCUM_PROG,FWENCUM_ACCT,FWENCUM_ACTV,FWENCUM_LOCN,FWENCUM_INDCOST_BUDGET,FWENCUM_INDCOST_YTD,FWENCUM_INDCOST_COMM,FWENCUM_GRANT_TOTAL,FWENCUM_FUND_TOTAL,FWENCUM_BUDGET_FUND,FWENCUM_YTD_FUND,FWENCUM_ERROR,FWENCUM_AMOUNT_ENCUMBER) values ('420458','420420','05690','02','7623',' ',' ',26000,0,0,124783.52,null,null,null,null,26000);
    Insert into FWENCUM (FWENCUM_FUND,FWENCUM_GRNT,FWENCUM_ORG,FWENCUM_PROG,FWENCUM_ACCT,FWENCUM_ACTV,FWENCUM_LOCN,FWENCUM_INDCOST_BUDGET,FWENCUM_INDCOST_YTD,FWENCUM_INDCOST_COMM,FWENCUM_GRANT_TOTAL,FWENCUM_FUND_TOTAL,FWENCUM_BUDGET_FUND,FWENCUM_YTD_FUND,FWENCUM_ERROR,FWENCUM_AMOUNT_ENCUMBER) values ('420457','420420','18110','02','7623',' ',' ',26000,3543.58,0,124783.52,null,null,null,null,22456.42);
    Basically, I want to delete all the lines where the amount of
     fwencum_amount_ecumber
    more then the unique value under
    fwencum_grant_total for that grant
    by grant code in other words the expected output should be delete 15 ranks.
    because the sum of fwencum_Amount_encumber granting 420420 would be higher then the 124,783.52 under the fwencum_grant_Total
    I tried to do this, but I keep getting errors I get a little advice.

    Here is my poor attempt
    DELETE  fwencum
      WHERE  (select sum(f.fwencum_amount_encumber) from fwencum f) > (SELECT DISTINCT 
                                                                        FWENCUM_GRANT_TOTAL 
                                                                        FROM fwencum F, FWENCUM F2
                                                                        WHERE F.fwencum_grnt=F2.FWENCUM_GRNT);
    Published by: mlov83 on Sep 22, 2011 19:24

    Hello

    Thanks for posting the CREATE TABLE and INSERT statemnts; It is very useful.
    It seems that only 3 columns play no role in this issue. If so, why you send messages 16 colummns?

    What you want (if I understand the problem) is to do a correlated subquery , where the subquery refers to something in the main charge and (potentially) so does something different for each line of the main declaration, like this:

    DELETE     fwencum       m     -- m is for main
    WHERE     fwencum_grant_total < (
                        SELECT  SUM (fwencum_amount_encumber)
                        FROM     fwencum
                        WHERE     fwencum_grnt     = m.fwencum_grnt
                         )
    ;
    
  • I have two problems: 1) a theme that does not change the look of my Firefox at all 2) there is no button 'disable' for my themes only 'delete '. Help, please!

    Okay, so my problems are...
    (1) I downloaded a theme for the first time and when I did, it worked perfectly fine. After updating, I download the theme again and it helped, but the theme will not change the look of my browser. When I tried one of the relevant articles, I cleared my cookies and cache and downloaded the theme (A Blue Fox), installed and turned on, and it worked perfectly fine! I tried to upload another (Pink Fox), one installed and activated, but it did not work. Instead, he returned to the default theme. So I tried to clear my cache and cookies again and repeat the process, but now after downloading, it says "error".... "I don't know if it says"Error Downloading"or"installation error ". Now, I tried to download it again after turning off my computer and turn it back on again, but (today), the two has not applied to my browser. They both had the same look... by default! Please tell me what is the problem!
    (2) in my "Add-ons Manager" page, on the appearance tab, there is no button disable for my modules. Only the "delete" button is present.

    Please help me!

    NOTE: I already tried to reset Firefox, but it does not solve my problem.

    You do not disable a theme, but you choose another theme if you want to change the theme.

    Remove button is for when you no longer want this theme.

    You must select a theme and then close and restart Firefox, if you want to use this theme.

    If this does not work, then you may have a problem with the prefs or something interferes.

    If you don't keep changes after a reboot then see:

  • Deleted stream help photo album!

    I think I deleted my photo stream album.  How can I get it back?

    Ferrus67 wrote:

    I think I deleted my photo stream album.  How can I get it back?

    My photo FAQ - Apple Support stream

    Get help using my photo stream - Apple Support

  • Cannot delete old help files

    IQ506 tired BSOD after updating Win7-64 on original Vista 64. Finally decided to do a clean install. 3 months and works well. When I did the clean install, for some reason, it creates a windows.old folder. Now, I'm trying to delete this folder and cannot do. He repeats to me I need admin approval. There is a computer at home and I am the only user and I've set up as the admin. I DL file called appropriate and he ran on the entire folder and subfolders. Still, I can't delete this folder. I have this same problem on external USB drives where I made backups going back several years. I have to constantly run him appropriated so I can manipulate files. I have worked with and built my own system dating back to the old time CPM, so I'm not a beginner. I understand trying to systems 'fool proof', but please, these are MY files and I should be able to remove. Sometimes I miss the old days BACK. (But I * beep * of course would not go back to the old days of Windows 3.1 unstable, the old diskettes and 20 discs hard meg!)

    Yes, I am a senior and I still want more recent/more great technology. I love Windows 7 but these rules administrator and lock out is driving me crazy. I know how to set up other users and limit their access, as I did for my daughters computer and my little children. But it's my computer, and again, I am the only user. What Miss me?

    Solution has been made so very simple. Seems he could have nothing more than a problem of refresh. I clicked on the Windows icon, click on logout of the user and then connected rear (even if I'm the only user account.) When I returned to windows.old, I could remove all without error. Better the process of re - install. Simple is always better. I still decided to never leave a machine or a system to get the better of me. Thanks for your help and maybe this simple step will help you others.

  • Rescue &amp; backups delete recovery HELP!

    Hi, I have an SL500 and the hard drive was 250 GB, but there are 211 gb available. in any case, I noticed that I was somehow only left out of 211 gb 80 GB. I asked that he was a technician at IBM and at - he said it was my backup of files. now, the drive from my computer q crashed in March of me to try to do something with the back ups and I need a whole new HDD, but my music has been registered via a flash drive.  the tech guy said that I should remove my old back ups. very well, very well. IM do that tonight and it is literally taken hours and right when I click on 'remove' it is not an answer.  I had my computer folder (? I think it's what you call) open so I could see how much space I had, and it DECREASES in fact then I was "suppression" of backups, and yet it was inadmissible. She went from 80 GB to 60 GB. Please help me solve this problem, im shaking for fear of losing my files because I don't want to do it like the last time. I don't know what could be taken from so much space.

    I plan to buy an external hard drive in the next week but please help me, I'm 17 and I'm relics fear of losing my files again and my 19 GB of music.

    Help, please

    Rescue and recovery in your folder of ThinkVantage software creates backups (a full backup and the others are incremental) and stores them on another part of the HARD drive that you will not be able to see just by going to the properties of the C: drive.

    Check the record of ThinkVantage Rescue and Recovery

    Start-> all programs-> ThinkVantage (or Lenovo Care)-> Rescue and Recovery

    Once you are there, you will see a bar upstairs with 4 or 5 options. Here, you have the ability to view the size of your backups. You also have the option to delete them. Search for the word "Advanced" in the menu bar, then select 'delete backups"to remove them and free up space on your hard drive. Don't forget that you can also "schedule" of your backups and you can choose to change the location you want to that backups going. For example, you can have the backups Save on a CD or on a drive of 'network '.

    If you have Vista as an operating system, you can go to this document on our site of Lenovo to get a general understanding of our HARD drive partitions:

    http://www-307.IBM.com/PC/support/site.WSS/document.do?sitestyle=Lenovo&lndocid=MIGR-70829

    Let me know if you need additional assistance.

    Thank you

    Mark

Maybe you are looking for