Update with exists and subquery

Hi how to pass index to this sql
Table pap ( eqid,seq,histseq,docno,status,value1,value2)
PK(eqid,seq,histseq) and indx (docno)
table pa ( eqid,seq,docno,status,value1,value2)
PK(eqid,seq) and indx (docno)
update pa
set (value1,value2) = (select pap.value1,pap.value2 from pap
where pap.eqid = pa.eqid
and pap.seq = pa.seq
and pap.histseq =1
and pap.docno <> pa.docno
and pap.status = 4 )
where pa.status=1
and exists ( select 1 from pap
where pap.eqid = pa.eqid
and pap.seq = pa.seq
and pap.histseq =1
and pap.docno <> pa.docno
and pap.status =4 )
It is doing fulltable scan on pa and using hash join .
How to write update with subquery method also ?

There's nothing wrong with a full scan.
Please read this explanation/example: http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:9422487749968
If you want more explanation then please follow these guidelines below, so we have sufficient inputs:
[When your query takes too long...|http://forums.oracle.com/forums/thread.jspa?messageID=1812597#1812597]
[How to post a SQL statement tuning request|http://forums.oracle.com/forums/thread.jspa?threadID=863295&tstart=0]
Remember to put the tag befor and after the examples you post.
See http://forums.oracle.com/forums/help.jspa regarding tags.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Similar Messages

  • HT4623 I downloaded update with itunes and now all I see is itunes logo and arrow to a plug

    I downloaded an update with itunes and now myiphone is black and only shows itunes logo with an arrow and plug.  no phone tried holding down on off still black  please help I need this phone

    http://support.apple.com/kb/ht1808

  • TS3694 my iphone 4s said it needed updating to ios7.2 and so far its displaying the itunes logo and saying plug into itunes so i tried updating with itunes and it keeps saying it has failed (3194)

    my iphone 4s said it needed updating to ios7.2 and so far its displaying the itunes logo and saying plug into itunes so i tried updating with itunes and it keeps saying it has failed (3194)

    Hello Amz_Bajwa,
    Thanks for using Apple Support Communities.
    For more information on this, take a look at:
    iTunes: Specific update-and-restore error messages and advanced troubleshooting
    http://support.apple.com/kb/TS3694#error3194
    Unable to contact the iOS software update server gs.apple.com
    Error 1004, 1013, 1638, 3014, 3194: These errors may be the result of the connection to gs.apple.com being redirected or blocked. Follow these steps to resolve these errors:
    Install the latest version of iTunes.
    Check security software and ensure that communication to gs.apple.com is allowed. Follow these stepsfor assistance with security software.
    Check the hosts file. The restore will fail if there is an active entry to redirect gs.apple.com. Follow theadvanced iTunes Store troubleshooting steps to edit the hosts file or revert to a default hosts file. See "Blocked by configuration: (Mac OS X/Windows) > Rebuild network information."
    Try to restore from another known-good computer and network.
    If the errors persist on another computer, the device may need service.
    Best of luck,
    Mario

  • We have 2 iphone 4s which have just been updated with IOS5 and whilst setting up icloud the phone contacts were merged and now i have lost my phone contacts on first iphone 4 which have been replaced with phone contacts from my second iphone 4. help?

    We have two Iphone 4 handsets. I updated first handset with IOS5 and activated Icloud with my existing Itunes account details - no problems. I then did the same on the second handset and instead of setting up a different Icloud account for the second hanset I mistakenly used the same details as on the first handset and merged the contacts thinking it would add all contacts to both handsets but it instead replaced contacts from first handset with those from the second handset.
    How do I get back my contacts from the first hanset?
    I read somewhere Icloud saves the last 3 backups which suggests all my contacts that have disappeared are somewhere but how do i find them ???
    Help ???

    Here's how to do it.
    1. App Store, iTunes Store should have the same AppleID on Computer and iPhones. (Free to share apps, music and books... )
    2. Person A uses the same purchasing account for everything (ie. email, contacts and ...).
    3. Person B have the same purchase account see no. 1 (for App Store and iTunes Store) but create a second AppleID for iCal, e-mail, contacts  and etc.

  • Update with join and group by

    Hello All,
    I'm trying to update several colums of a table from a inner join query.
    First a retrieve the rows afected and the values that I need for the update (I call this subquery ED_Query).
    It's important to note that this subquery has a group by and and having clause.
    My first attemp (using the query that work in SQL Server query) fails:
    SQL> update ED_Update
    2 set ED_Update.dtHoraInicioReal = ED_Query.dtHoraInicioReal,
    3 ED_Update.dtHoraFinReal = ED_Query.dtHoraFinReal,
    4 ED_Update.fPorcentajeRealizado = ED_Query.fPorcentajeRealizado
    5 from HISTORICOS_AVANZA.HSAE_HIS_EXPEDICIONDIARIA ED_Update
    6 inner join (
    7 select distinct ED.iIdExpedicion, ED.iIdExpedicionDiaria,
    8 MAX(PT.iOrdenEnTrayecto) + 1 as iNumParadas,
    9 MAX(HPP.iOrden) as iOrdenUltimaParada,
    10 MIN(dtHora_LlegadaReal + iTiempoEnParada/(24*60*60)) as dtHoraInicioReal,
    11 MAX(dtHora_LlegadaReal) as dtHoraFinReal,
    12 100 * cast ((MAX(HPP.iOrden) + 1) as float) / cast ((MAX(PT.iOrdenEnTrayecto) + 1) as float) as fPorcentajeRealizado
    13 from HISTORICOS_AVANZA.HSAE_HIS_EXPEDICIONDIARIA ED
    14 left join HISTORICOS_AVANZA.HSAE_HIS_HORAPASOPARADA HPP
    15 on ED.iIdExpedicion = HPP.iIdExpedicion and ED.dtJornada = HPP.dtJornada
    16 left join AVANZA.SAE_URB_PARADASTRAYECTO PT on ED.iIdLinea = PT.iIdLinea and ED.iIdTrayecto = PT.iIdTrayecto
    17 where ED.dtJornada = TO_DATE('14/01/2013', 'DD/MM/YYYY') and ED.iIdExpedicion in (-131076)
    18 group by ED.iIdExpedicion, ED.iIdExpedicionDiaria, ED.dtHoraInicioReal, ED.dtHoraFinReal
    19 having ED.dtHoraInicioReal <> min(dtHora_LlegadaReal + iTiempoEnParada/(24*60*60))
    20 or ED.dtHoraFinReal <> max(dtHora_LlegadaReal)
    21 ) ED_Query
    22 on ED_Update.iIdExpedicionDiaria = ED_Query.iIdExpedicionDiaria;
    ERROR at line 5:
    ORA-00933: SQL command not properly ended
    The subquery (ED_Query) work fine in Oracle, so I suspect that the problems are when I mix it with the update clause.
    SQL> select distinct ED.iIdExpedicion, ED.iIdExpedicionDiaria,
    2 MAX(PT.iOrdenEnTrayecto) + 1 as iNumParadas,
    3 MAX(HPP.iOrden) as iOrdenUltimaParada,
    4 MIN(dtHora_LlegadaReal + iTiempoEnParada/(24*60*60)) as dtHoraInicioReal,
    5 MAX(dtHora_LlegadaReal) as dtHoraFinReal,
    6 100 * cast ((MAX(HPP.iOrden) + 1) as float) / cast ((MAX(PT.iOrdenEnTrayecto) + 1) as float) as fPorcentajeRealizado,
    7 ED.dtHoraInicioReal as ED_dtHoraInicioReal, ED.dtHoraFinReal as ED_dtHoraFinReal, ED.fPorcentajeRealizado as ED_fPorcentajeRealizado
    8 from HISTORICOS_AVANZA.HSAE_HIS_EXPEDICIONDIARIA ED
    9 left join HISTORICOS_AVANZA.HSAE_HIS_HORAPASOPARADA HPP
    10 on ED.iIdExpedicion = HPP.iIdExpedicion and ED.dtJornada = HPP.dtJornada
    11 left join AVANZA.SAE_URB_PARADASTRAYECTO PT on ED.iIdLinea = PT.iIdLinea and ED.iIdTrayecto = PT.iIdTrayecto
    12 where ED.dtJornada = TO_DATE('14/01/2013', 'DD/MM/YYYY') and ED.iIdExpedicion in (-131076)
    13 group by ED.iIdExpedicion, ED.iIdExpedicionDiaria, ED.dtHoraInicioReal, ED.dtHoraFinReal, ED.fPorcentajeRealizado
    14 having ED.dtHoraInicioReal <> min(dtHora_LlegadaReal + iTiempoEnParada/(24*60*60))
    15 or ED.dtHoraFinReal <> max(dtHora_LlegadaReal);
    IIDEXPEDICION IIDEXPEDICIONDIARIA INUMPARADAS IORDENULTIMAPARADA DTHORAINI
    DTHORAFIN FPORCENTAJEREALIZADO ED_DTHORA ED_DTHORA ED_FPORCENTAJEREALIZADO
    -131076 5662 406 15-JAN-13
    15-JAN-13 15-JAN-13 15-JAN-13 0
    -131076 5663 406 15-JAN-13
    15-JAN-13 15-JAN-13 15-JAN-13 0
    -131076 5664 406 15-JAN-13
    15-JAN-13 15-JAN-13 15-JAN-13 0
    After reading this forum, I change the query and try the next one:
    SQL> UPDATE
    2 (
    3 select distinct ED.iIdExpedicion, ED.iIdExpedicionDiaria,
    4 MAX(PT.iOrdenEnTrayecto) + 1 as iNumParadas,
    5 MAX(HPP.iOrden) as iOrdenUltimaParada,
    6 MIN(dtHora_LlegadaReal + iTiempoEnParada/(24*60*60)) as dtHoraInicioReal,
    7 MAX(dtHora_LlegadaReal) as dtHoraFinReal,
    8 100 * cast ((MAX(HPP.iOrden) + 1) as float) / cast ((MAX(PT.iOrdenEnTrayecto) + 1) as float) as fPorcentajeRealizado,
    9 ED.dtHoraInicioReal as ED_dtHoraInicioReal, ED.dtHoraFinReal as ED_dtHoraFinReal, ED.fPorcentajeRealizado as ED_fPorcentajeRealizado
    10 from HISTORICOS_AVANZA.HSAE_HIS_EXPEDICIONDIARIA ED
    11 left join HISTORICOS_AVANZA.HSAE_HIS_HORAPASOPARADA HPP
    12 on ED.iIdExpedicion = HPP.iIdExpedicion and ED.dtJornada = HPP.dtJornada
    13 left join AVANZA.SAE_URB_PARADASTRAYECTO PT on ED.iIdLinea = PT.iIdLinea and ED.iIdTrayecto = PT.iIdTrayecto
    14 where ED.dtJornada = TO_DATE('14/01/2013', 'DD/MM/YYYY') and ED.iIdExpedicion in (-131076)
    15 group by ED.iIdExpedicion, ED.iIdExpedicionDiaria, ED.dtHoraInicioReal,ED.dtHoraFinReal, ED.fPorcentajeRealizado
    16 having ED.dtHoraInicioReal <> min(dtHora_LlegadaReal + iTiempoEnParada/(24*60*60))
    17 or ED.dtHoraFinReal <> max(dtHora_LlegadaReal)
    18 )
    19 SET ED_dtHoraInicioReal = dtHoraInicioReal,
    20 ED_dtHoraFinReal = dtHoraFinReal,
    21 ED_fPorcentajeRealizado = fPorcentajeRealizado;
    ERROR at line 2:
    ORA-01732: data manipulation operation not legal on this view
    Some help?
    Thanl in advance.
    Edited by: 984483 on 28-ene-2013 1:48

    Thanks for your answer. I tried to rewrite my question.
    SQL> select * from v$version;
    BANNER
    Oracle9i Enterprise Edition Release 9.2.0.3.0 - Production
    PL/SQL Release 9.2.0.3.0 - Production
    CORE 9.2.0.3.0 Production
    TNS for 32-bit Windows: Version 9.2.0.3.0 - Production
    NLSRTL Version 9.2.0.3.0 - Production
    I have 2 tables. I like to update one of them (ED_Update) with the data from the another one (ED_Query).
    This example is equivalent:
    create table ED_Query (id number,
         date01 date,
    number01 number)
    insert into ED_Query values (1, to_date('01/01/2013','DD/MM/YYYY'), 10);
    insert into ED_Query values (2, to_date('01/01/2013','DD/MM/YYYY'), 20);
    insert into ED_Query values (3, to_date('01/01/2013','DD/MM/YYYY'), 30);
    insert into ED_Query values (4, to_date('02/01/2013','DD/MM/YYYY'), 40);
    insert into ED_Query values (5, to_date('03/01/2013','DD/MM/YYYY'), 50);
    create table ED_Update (date01 date,
              numberMax number,
              numberSum number)
    insert into ED_Update values (to_date('01/01/2013','DD/MM/YYYY'), 0, 0);
    insert into ED_Update values (to_date('02/01/2013','DD/MM/YYYY'), 0, 0);
    insert into ED_Update values (to_date('03/01/2013','DD/MM/YYYY'), 0, 0);     
    The next update query fails with ORA-00933: SQL command not properly ended.
    update ED_Update
    set ED_Update.date01 = ED_Query.date01,
         ED_Update.numberMax = ED_Query.numberMax,
         ED_Update.numberSum = ED_Query.numberSum
    inner join
         select date01, max (number01) as numberMax, sum(number01) as numberSum
         from ED_Query
         where date01 = TO_DATE('01/01/2013', 'DD/MM/YYYY')
         group by date01
    ) ED_Query
    on ED_Update.date01 = ED_Query.date01
    I think the problem is in the update clause because the next query work:
    select * from
    ED_Update
    inner join
         select date01, max (number01) as numberMax, sum(number01) as numberSum
         from ED_Query
         where date01 = TO_DATE('01/01/2013', 'DD/MM/YYYY')
         group by date01
    ) ED_Query
    on ED_Update.date01 = ED_Query.date01
    Thank in advance.

  • Gr Ir Assignment Updation with PO and Line Item

    In the GL for GR IR Account the sort key was not  maintained with PO number due to which the assigment field in the line item was getting updated with the posting date and not with the PO & LIne Item details.
    We have made the requiste changes and new items are getting updated properly.
    But require assitance in updating the earlier line items.
    As of date total line items are more than  0.15 mn.
    Please suggest some method to automatically update the assigment field of the GR IR Line items with the PO Details.
    Regards
    Mukesh

    Hi,
    You can use a substitution to update the field through FI. Use GGB4 for wirting a substitution you may need some ABAP coding to substitute PO no and line items in the assignment field.  rule would be Co code =XXX and GL account =xxx and Posting date earlier than =xxxx  then concatenrate EBELN and EBELP in Assigment field Zounr.
    Then execute FBL3N and edit the assignment field by selecting all the documents and then save it you should see the PO line items populated. You can leave the substitution on or you can remove it after updating,
    Regards
    K.R

  • WorkFlow get triggered even if we set trigger for item update with SPEmailEventReceiver and workflow attached to same Library

    Hi All,
               I have a situation, SPEmailEventReceiver and WorkFlow is attached to same library, WorkFlow is configured to run after item is updated, but soon as the email is received in library the workflow
    is getting triggered, We have a action to create folder with subject and date and put the attachment with the date folder in SPEmailEventReceiver e.g: once a mail is received in library the SPEmailEventReceiver will create a folder with Subject and then Folder
    with Date and then put the attachment in the date folder so hierarchy will be subject folder/Date folder/attachment
    I have tried to alter the SquenceNumber attribute in Feature Element file to 1 and make the Synchronization as synchronous but no luck.

    Hi,
    Here are some articles for your reference:
    Programmatically creating Folders within SharePoint List
    http://www.mindfiresolutions.com/Programmatically-creating-Folders-within-SharePoint-List-487.php
    How to use SPEmailEventReceiver?
    http://kkryczka.wordpress.com/2010/11/05/how-to-use-spemaileventreceiver/
    Attachments disappear with custom email event handler
    http://blogs.msdn.com/b/malag/archive/2009/05/13/attachments-disappear-with-custom-email-event-handler.aspx?PageIndex=2
    Thanks,
    Dennis Guo
    TechNet Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Dennis Guo
    TechNet Community Support

  • Auxiliary table (other than with as and subquery)

    Hello my friends
    I know that two ways of implementing tempolary tables are with-as-select and also subqueries.
    is there any other way to have auxiliary tables in oracle?
    I use oracle 11.2.0.2
    thank you in advance.
    (i should mention that before asking i searched google)
    best,david

    1003209 wrote:
    yes i meant somehow temporary table, auxiliary table, by with-as oder subquery i just wanted to give example(maybe not a relevent example)Does the word TEMPORARY in Temporary table refers to the state of the Data in the table or the State of the table itself?
    Becuase GTT (Global temporary table) is actually a physical table in Oracle with different level of data persistency (Transaction level and Session Level)
    SQL Server offers temporary table in which the table itself is not persistent. The table is automatically dropped (Not sure how it works, as not an experienced SQL Server person)
    The WITH clause in SELECT is Just a Named Query. Oracle optimizer can materialize the result set of the subquery in the WITH clause and reuse it.

  • Using OleDbDataAdapter Update with InsertCommands and getting blocking locks on Oracle table

    The following code snippet shows the use of OleDbDataAdapter with InsertCommands.  This code is producing many inserts on the Oracle table and is now suffering from contention... all on the same table.  How does the OleDbDataAdapter produce
    inserts from a dataset... what characteristics do these inserts inherent in terms of batch behavior... or do they naturally contend for the same resource. 
    oc.Open();
    for (int i = 0; i < xImageId.Count; i++)
    // Create the oracle adapter using a SQL which will not return any actual rows just the structure
    OleDbDataAdapter da =
       new OleDbDataAdapter("SELECT BUSINESS_UNIT, INVOICE, ASSIGNMENT_ID, END_DT, RI_TIMECARD_ID, IMAGE_ID, FILENAME, BARCODE_LABEL_ID, " +
       "DIRECT_INVOICING, EXCLUDE_FLG, DTTM_CREATED, DTTM_MODIFIED, IMAGE_DATA, PROCESS_INSTANCE FROM sysadm.PS_RI_INV_PDF_MERG WHERE 1 = 2", oc);
    // Create a data set
    DataSet ds = new DataSet("documents");
    da.Fill(ds, "documents");
    // Loop through invoices and write to oracle
    string[] sInvoices = invoiceNumber.Split(',');
    foreach (string sInvoice in sInvoices)
        // Create a data set row
        DataRow dr = ds.Tables["documents"].NewRow();
        ... map the data
        // Populate the dataset
        ds.Tables["documents"].Rows.Add(dr);
    // Create the insert command
    string insertCommandText =
        "INSERT /*+ append */ INTO PS_table " +
        "(SEQ_NBR, BUSINESS_UNIT, INVOICE, ASSIGNMENT_ID, END_DT, RI_TIMECARD_ID, IMAGE_ID, FILENAME, BARCODE_LABEL_ID, DIRECT_INVOICING, " +
        "EXCLUDE_FLG, DTTM_CREATED, DTTM_MODIFIED, IMAGE_DATA, PROCESS_INSTANCE) " +
        "VALUES (INV.nextval, :BUSINESS_UNIT, :INVOICE, :ASSIGNMENT_ID, :END_DT, :RI_TIMECARD_ID, :IMAGE_ID, :FILENAME,  " +
        ":BARCODE_LABEL_ID, :DIRECT_INVOICING, :EXCLUDE_FLG, :DTTM_CREATED, :DTTM_MODIFIED, :IMAGE_DATA, :PROCESS_INSTANCE)";
    // Add the insert command to the data adapter
    da.InsertCommand = new OleDbCommand(insertCommandText);
    da.InsertCommand.Connection = oc;
    // Add the params to the insert
    da.InsertCommand.Parameters.Add(":BUSINESS_UNIT", OleDbType.VarChar, 5, "BUSINESS_UNIT");
    da.InsertCommand.Parameters.Add(":INVOICE", OleDbType.VarChar, 22, "INVOICE");
    da.InsertCommand.Parameters.Add(":ASSIGNMENT_ID", OleDbType.VarChar, 15, "ASSIGNMENT_ID");
    da.InsertCommand.Parameters.Add(":END_DT", OleDbType.Date, 0, "END_DT");
    da.InsertCommand.Parameters.Add(":RI_TIMECARD_ID", OleDbType.VarChar, 10, "RI_TIMECARD_ID");
    da.InsertCommand.Parameters.Add(":IMAGE_ID", OleDbType.VarChar, 8, "IMAGE_ID");
    da.InsertCommand.Parameters.Add(":FILENAME", OleDbType.VarChar, 80, "FILENAME");
    da.InsertCommand.Parameters.Add(":BARCODE_LABEL_ID", OleDbType.VarChar, 18, "BARCODE_LABEL_ID");
    da.InsertCommand.Parameters.Add(":DIRECT_INVOICING", OleDbType.VarChar, 1, "DIRECT_INVOICING");
    da.InsertCommand.Parameters.Add(":EXCLUDE_FLG", OleDbType.VarChar, 1, "EXCLUDE_FLG");
    da.InsertCommand.Parameters.Add(":DTTM_CREATED", OleDbType.Date, 0, "DTTM_CREATED");
    da.InsertCommand.Parameters.Add(":DTTM_MODIFIED", OleDbType.Date, 0, "DTTM_MODIFIED");
    da.InsertCommand.Parameters.Add(":IMAGE_DATA", OleDbType.Binary, System.Convert.ToInt32(filedata.Length), "IMAGE_DATA");
    da.InsertCommand.Parameters.Add(":PROCESS_INSTANCE", OleDbType.VarChar, 10, "PROCESS_INSTANCE");
    // Update the table
    da.Update(ds, "documents");

    Here is what Oracle is showing as blocking locks and the SQL that has been identified with each of the SIDS.  Not sure why there is contention.  There are no triggers or joined tables in this piece of code.
    Here is the SQL all of the SIDs below are running:
    INSERT INTO sysadm.PS_RI_INV_PDF_MERG (SEQ_NBR, BUSINESS_UNIT, INVOICE, ASSIGNMENT_ID, END_DT, RI_TIMECARD_ID, IMAGE_ID, FILENAME, BARCODE_LABEL_ID, DIRECT_INVOICING, EXCLUDE_FLG, DTTM_CREATED, DTTM_MODIFIED, IMAGE_DATA, PROCESS_INSTANCE) VALUES (SYSADM.INV_PDF_MERG.nextval,
    :BUSINESS_UNIT, :INVOICE, :ASSIGNMENT_ID, :END_DT, :RI_TIMECARD_ID, :IMAGE_ID, :FILENAME, :BARCODE_LABEL_ID, :DIRECT_INVOICING, :EXCLUDE_FLG, :DTTM_CREATED, :DTTM_MODIFIED, :IMAGE_DATA, :PROCESS_INSTANCE)
    SID 1452 (BTSUSER,BIZTPRDI,BTSNTSvc64.exe) in instance FSLX1 is blocking SID 1150 (BTSUSER,BIZTPRDI,BTSNTSvc64.exe) in instance FSLX1
    SID 1452 (BTSUSER,BIZTPRDI,BTSNTSvc64.exe) in instance FSLX1 is blocking SID 1452 (BTSUSER,BIZTPRDI,BTSNTSvc64.exe) in instance FSLX1
    SID 1452 (BTSUSER,BIZTPRDI,BTSNTSvc64.exe) in instance FSLX1 is blocking SID 1156 (BTSUSER,biztprdi,BTSNTSvc64.exe) in instance FSLX3
    SID 1452 (BTSUSER,BIZTPRDI,BTSNTSvc64.exe) in instance FSLX1 is blocking SID 6 (BTSUSER,BIZTPRDI,BTSNTSvc64.exe) in instance FSLX2
    SID 1452 (BTSUSER,BIZTPRDI,BTSNTSvc64.exe) in instance FSLX1 is blocking SID 1726 (BTSUSER,BIZTPRDI,BTSNTSvc64.exe) in instance FSLX2
    SID 1452 (BTSUSER,BIZTPRDI,BTSNTSvc64.exe) in instance FSLX1 is blocking SID 2016 (BTSUSER,biztprdi,BTSNTSvc64.exe) in instance FSLX2

  • Problems after iOS 6.0 update with iMessage  and FaceTime

    After iOS 6.0 update i had problems to used iMessage and FaceTime

    Messages will almost send but stop right before completion. FaceTime will go through only after multiple attempts. After that iMessage will work for a little while. Have talked with folks at apple support but they did not have a solution. Have tried both closing out the programs as well as turning the iPod off and back on. Neither has solved the problem. Any suggestions would be great! Thanks for your help.

  • Update with use of subquery

    I'd like to update all the rows with values getting from subquery from the same table.
    For example, the subquery of
    select id, some_manipulation as value from table_a
    id value
    1 12
    2 14
    3 16
    4 21
    I'd like to use above info update the values of a column (column2 of table_a) according to the same id. Something like this
    update table_a a
    set a.column2 = b.value
    where a.id =
    (select b.id from table_a b);
    I know above sql sytax is invalid, but I just want to give you an idea what I'm tryig to accomplish. Any idea?
    Thanks in advance,
    Ittichai

    A slightly modified version of Sri's solution will work for all cases. Assuming proper indexing, this should be relatively fast.
    SQL>SELECT * FROM table_a;
                  ID             COL1             COL2
                   1                2                0
                   2                3                0
                   3                1               15
    SQL>SELECT * FROM table_b;
                  ID             COLA
                   1                6
                   2               12
    SQL>UPDATE table_a a
      2  SET col2 = nvl((SELECT a.col1*b.cola
      3              FROM table_b b
      4              WHERE a.id = b.id),a.col2);
    3 rows updated.
    SQL>commit;
    Commit complete.
    SQL>SELECT * FROM table_a;
                  ID             COL1             COL2
                   1                2               12
                   2                3               36
                   3                1               15In the case of table_b not having the id, the current value of col2 will be retained. If you want some other value, then substitute it in the NVL. You can even use a different select statement as the return from nvl.
    SQL>UPDATE table_a a
      2  SET col2 = nvl((SELECT a.col1*b.cola
      3              FROM table_b b
      4              WHERE a.id = b.id),(SELECT col2 from table_a where id = 2));
    3 rows updated.
    SQL>commit;
    Commit complete.
    SQL>SELECT * FROM table_a;
                  ID             COL1             COL2
                   1                2               12
                   2                3               36
                   3                1               36

  • IPAD IS RUNNING AFTER ATTEMPT TO UPDATE WITH APPLE AND LOADING ON SCREEN

    my ipad ceases to function normally and i was unable to use email and no contacts were displayed. logged on my computer and there was an update due attempted the update and it failed. now ipad has apple symble in black screen with loading indicator running has been like this over 1 hour

    With it connected to itunes, select Restore.
    If it will not let you, disconnect the iPad, press and hold the home and power buttons for ten seconds, until the apple appears. Then, after it restarts, restore it.

  • System Update with T440s and Windows 8.1

    I installed clean install windows 8.1 (iso directly from Microsoft) and I was thinking, that Lenovo System Update will install all necessary drivers and tools for me.
    Sadly, this was not happening at all. Majority of drivers was missing. Even newest bios wasn't offered for install. However, on lenovo's website all drivers was available.
    Is this only problem with my laptop or it is general behavior?
    Thanks,
    Solved!
    Go to Solution.

    We are way behind in posting Win8.1 drivers/software to TVSU.  All I can say is to get the things you need from the website, or else wait another month or so.  Sorry for this inconvenience.

  • My auru script to show all available updates with versions and install

    So, I decided to hack together a little script that might be useful to someone else too.  I wanted to script that would show me all available updates, from from the official repos as well as from the aur.  I also wanted to see at a glance what the installed versions of each package and the new version to be installed are. 
    The output looks something like this:
    [shaun@shaun-asus-x202e ~]$ auru
    Available updates from core:
    vlc 2.1.2-2 2.1.2-3
    Available updates from AUR:
    ansible 1.4.3-1 1.4.4-1
    Would you like to install all updates without further prompting?
    y/n->
    Here's the code that I put into a dropbox shared file called arch_functions and source it from ~/.bashrc.   Replace the test_apacman function and associated commands with aur wrapper of choice.  Once this is in place, I simply run auru once a day on all my machines and I get all the information I need, and only press a y or n in order install all updates. 
    bold="\033[1m"
    endbold="\033[0m"
    test_apacman() {
    hash apacman 2>/dev/null || \
    #packer -S apacman --noedit --noconfirm
    #sudo pacman -S --needed --noconfirm base-devel jshon git curl
    hash wget 2>/dev/null || sudo pacman -S --needed --noconfirm wget
    origdir=$(pwd)
    cd ${HOME}
    mkdir -p ./tmpaur/
    cd ./tmpaur/
    wget https://aur.archlinux.org/packages/ap/apacman/apacman.tar.gz
    tar xfv apacman*
    cd apacman
    makepkg
    sudo pacman -U --needed --noconfirm apacman-*.pkg.tar.xz
    cd "$origdir"
    auru() {
    updatesavail=0
    ## check that dependencies are installed
    # expac
    hash expac || sudo pacman -S --needed --noconfirm expac
    # apacman
    test_apacman
    ### check core updates
    pacman -Syy
    echo -en "${bold}Available updates from core:${endbold}\n"
    pacmanupdates=$(sudo pacman -Qu)
    for pacmanupdate in "$pacmanupdates"
    do
    if [ "$pacmanupdate" == "" ]
    then
    echo "No core updates"
    else
    pkg=$(echo "$pacmanupdate" | awk '{print $1}')
    pkgvernow=$(echo "$pacmanupdate" | awk '{print $2}')
    pkgveravail=$(sudo pacman -Si ${pkg} | grep Version | awk '{print $3}')
    #echo -en "$pkg\t$pkgvernow\t$pkgveravail\n"
    printf '%-25s' "$pkg"
    printf '%-20s' "$pkgvernow"
    printf '%-20s\n' "$pkgveravail"
    updatesavail=$((updatesavail + 1))
    fi
    done
    ### check aur updates
    echo -en "${bold}Available updates from AUR:${endbold}\n"
    aurupdates=$(apacman --auronly --quickcheck)
    for aurupdate in "$aurupdates"
    do
    if [ "$aurupdate" == "" ]
    then
    echo "No AUR updates"
    else
    pkg="$aurupdate"
    pkgvernow=$(sudo pacman -Q ${pkg} | awk '{print $2}')
    pkgveravail=$(apacman -Ss ${pkg} | grep "aur/${pkg} " | awk '{print $2}')
    printf '%-25s' "$pkg"
    printf '%-20s' "$pkgvernow"
    printf '%-20s\n' "$pkgveravail"
    updatesavail=$((updatesavail + 1))
    fi
    done
    ### apply updates if any
    if [ $updatesavail -gt 0 ]
    then
    echo "Would you like to install all updates without further prompting?"
    read -p "y/n->" answer
    if [ "$answer" == "y" ]
    then
    sudo pacman -Su --noconfirm
    apacman -Su --auronly --noedit --noconfirm --needed
    fi
    fi
    Last edited by senorsmile (2014-01-20 04:41:14)

    For someone with a username like yours I would have expected better. I guess you are not a "tech guy" at all. After a while Apple improves the hardware, and updates iOS to take advantage of the features and speed of the newer hardware. Older devices are simply incapable of taking advantage of the newer features, because the hardware doesn't support it. There's a lot of advice posted in the forum from people who warn that you shouldn't upgrade an iPhone 4S to iOS 8, because it kills the performance. If that's true, imagine how iOS 8 must perform on an iPhone 4. 
    By your reasoning I should be able to run Windows 10 on a 1985 IBM PC. The only reason you can't is because Microsoft had a deal with hardware manufacturers to force people to get new computers.
    Or are you arguing that Apple should never improve hardware, because it will leave users of older phones in the lurch?

  • With all the updates with Firefox and Yahoo, My Yahoo homepage no longer works or functions at all. It doe's work on Safari. When I click on anything on My homepage all I get is a message" sorry bad request".

    I also often have to do a forced quit as firefox freezes up. I did not have these problems until I tryed to upgrade to firefox4. for Mac.
    I tryed re-enstalling 3.5 but ended up with 5 which was worse. It appears that Firefox and Yahoo are no longer compatible.

    I know you can't help with my Yahoo problem, however, apparently at some time in the past I have went to the Sync and tried to figure it out on both my laptop and my desktop, because I have the long snyc key information. However, when I go to try to sync both computers I never get the box to enter that key on either one. That is my problem. So should I try and get a new sync key and see if that works.

Maybe you are looking for

  • MacBook suddenly turns off at 40% of battery charge and trackpad doesn't work

    Hello, I had to replace the battery of my white MacBook (13 inches, mid 2010), because it was swollen, and the capacity was about just 20-30% of its original one. I bought a new one. Specifically, this one. After replacing it, I have those problems:

  • Installing Windows 7 on Bootcamp after upgrade to Mtn Lion

    Before installing Mountain Lion I erased Windows XP and all contents from Bootcamp. Now I am running Mountain Lion and attempting to put windows 7 on Bootcamp 5.0.0. I ran the disk utility on Bootcamp and it shows (formatted as Mac OS Extended (Journ

  • DMS ACL's

    Hello, I have an issue with DMS ACL's. I have activated the TDSwitch and was able to see the Authorization tab in the DIR. I added a user and given that user "NOauth" access for a particular document. But when I login as that user and searched for th

  • Paragraph format issue

    Hi there, I have this paragraph with font bold & font style Arial & size 10 PT. But when I use it for one txt in Smartforms the text doesn't appears to be Bold as expected. Weird thing is when we switch from this Para format to some other or some oth

  • Iphone not showing in windows

    When I plug my 3gs into my windows 7 pc it doesnt show in either windows or itunes... What should I do?