Sub-query got stuck  !!!

Data
fcst_retail_value (current Table)
fcst_entity_id period_id fcst LYfcst
100     2000     30     null
100     2002     40     null
100     2003     70     null
100 2001 50 null
200     3000     140 null
200     3001 400 null
300     8000     160 null
300     9000     260 null
300     4000     270 null
400     5000     440     null
400     6000     960     null
400 7000     900 null
retail_fcst_map
fcst_entity_id retail_entity_id
100               101
100               102
100               103
200               201
200               202
300               301
300               302
400               401
400               402
retail_bucket
retail_entity_id retail_type_cd retail Period_id
101          forecasted     30          2000
102          forecasted 40          2002
101     forecasted     50          2001
102 forecasted 70          2003
202 forecasted     140          3000
201 forecasted     150          3001
204 forecasted     250          3001
301 forecasted     160          8000
303 forecasted     260          9000
302 forecasted     270 4000
401 forecasted     330 6000
402 forecasted     440 5000
403 forecasted 500 7000
404 forecasted 400 7000
405 forecasted     630 6000
cal_period
period_id year cal_id
2001     2004 45
2000     2006 45
2002     2005 45
2003     2003 45
3000 2006 44
3001 2005 44
3002 2004 44
8000 2006 43
9000 2005 43
4000 2004 43
5000 2006 42
6000 2005 42
7000 2004 42
OUTPUT NEEDED
updating fcst_retail_value.lyrdmd with last years data not changing any other data within the table
fcst_retail_value (2006 DATA + LYDMD populated)
fcst_entity_id period_id fcst LYfcst
100          2000          30     40
100          2002          40     50
100          2003          70     null
100 2001 50 70
200          3000          140 400
200          3001 400 null
300          8000          160 260
300          9000          260 270
300          4000          270 null
400          5000          440     960
400          6000          960     900
400          7000          900 null
Tried this but I think i need to write a sub query to go further:
select sum(db_self.retail_value) as db,
cp.year, db_self.period_id as dbp,
cp.period_id as cpp,
fdv_parent.period_id as fdvp,
fdv_parent.fcst_entity_id as feid,
cp.cal_period_id as ccpid,
cp.cal_id as calid
cp_ly.year
from retail_fcst_map dfm, retail_bucket db_self, fcst_retail_value fdv_parent, cal_period cp,cal_period cp_ly
WHERE dfm.fcst_entity_id = 100
AND dfm.retail_entity_id = db_self.retail_entity_id
and db_self.period_id = fdv_parent.period_id
and dfm.fcst_entity_id = fdv_parent.fcst_entity_id
and fdv_parent.period_id = cp.period_id
AND cp_ly.year = cp.year - 1
Group By db_self.period_id, cp.year, db_self.period_id, cp.period_id, fdv_parent.period_id, fdv_parent.fcst_entity_id, cp.cal_period_id, cp.cal_id;
Thanks
mohan

OUTPUT NEEDED
I need to update fcst_retail_value.lyfcst with last years data not changing any other data within the table
fcst_retail_value (2006 DATA + LYDMD populated)
fcst_entity_id period_id fcst LYfcst
100 2000 30 40
100 2002 40 50
100 2003 70 null
100 2001 50 70
200 3000 140 400
200 3001 400 null
300 8000 160 260
300 9000 260 270
300 4000 270 null
400 5000 440 960
400 6000 960 900
400 7000 900 null

Similar Messages

  • Update query got stuck

    Hi, i am creating an update query, i know I had problem before, but when i use this method, it works in one of the pages. Now i am having problem again. Don't know why. Here are the 2 methods i used, both failed.
    method 1:
    String sqltextupdate = "UPDATE BYDATA SET b=?, note=?, l_amt=? WHERE DATAID= 500";
    Statement stmt = conn.createStatement();
    PreparedStatement ps = conn.prepareStatement(sqltextupdate);
    ps.setDouble(1, b_amt);
    ps.setString(2, notes);
    ps.setDouble(3, ls_amt);
    ps.executeUpdate();
    Method 2:
    String sqltextupdate = "UPDATE BYDATA SET b="+b_amt+", note='"+notes+"', l_amt="+ls_amt+" WHERE DATAID=500"
    Statement stmt = conn.createStatement();
    stmt.executeUpdate(sqltextupdate);
    Please help!!
    Thank you!

    Never mind!
    My error: a primary key is create for the table bydata, and the problem is solved.

  • Max (date) in sub-query

    I have an issue with a big view and several queries running on it where the max (date) is required in the sub-select (example below). When I run traces and explain, the perf problem is when the where cluase is evaluated, the view is pulled second time - so I basically use this view twice. The fact that the date in the underlined table is indexed did not help.
    I tried to use "ROW_NUMBER() OVER (ORDER BY date ASC) AS row_number, " rather to select the max(date) in teh sub query but I get only 1 records returned by the query instead the expected about 25,000.
    Need help on how to correct the max(date) to perform better and also to understand how to correct the ROW_NUMBER() not to limit me to 1 row.
    Thanks a lot for the help, Tom
    create view test_date as select * from user_objects;
    select * --(I have specific columns in the real query)
    from test_date t1
    where LAST_DDL_TIME in
    (select max(LAST_DDL_TIME)
    from test_date t2
    where t1.OBJECT_ID=t2.OBJECT_ID --(more clauses to limit the result but not reflecting the problem)
    and t1.OBJECT_NAME =t2.OBJECT_NAME
    and OBJECT_TYPE not in('TABLE')
    group by t2.OBJECT_ID , t2.OBJECT_NAME )

    I got the query to run - with dense ranck and row-Number I get the same results. My partition by cluse was wrong. But the perfromance is not much better.
    Any other idea on how to optimize a query that uses pattern like below and needs to return all rows from a table that have the max enter date.
    Thanks a lot, tom
    Example:
    col1 col2 col3
    1 sysdate 'I need this record'
    2 sysdate 'I need this record'
    3 sysdate 'I need this record'
    4 sysdate 'I do NOT need this record'
    5 sysdate 'I do NOT need this record'
    5 sysdate+3 'I need this record'
    5 sysdate+2 'I do NOT need this record'
    4 sysdate+3 'I need this record'
    4 sysdate+2 'I do NOT need this record'
    4 sysdate+1 'I do NOT need this record'
    My query corrently is using the following construcion:
    select col1, col2 , col3
    from test_table t
    where 1,2,3
    and col3 = (select max(col3) from test_table t2 where t2.col1 = t.col1) group by t2.col1

  • Item got stuck with the status of "Ready to Release"

    I have one iten with huge quantity in Sales order.. i have transacted it.. but now there is some change in qunatity .. so now i am trying to backorder this line, now when i back ordered the line... some of it`s items got stuck in the status of Ready to Release status... i have released the sales order 3 times still it`s status is not changing.. can you tell me how to solve this issue.. i want to back order the line, which is stuck in the status of Ready to Release status...it`s little urgent...
    Thanks

    Hi,
    Are there any ship sets? Is the order or order line on hold?
    How are you releasing these order lines: from Transactions form or from Release Sales Order Form? If you are using transactions form, what is your default staging sub inventory? Is your item enabled to be transacted in this sub inventory? Is the sub inventory under locator control? If so, have you defined a default stage locator?
    If you are using Release Sales Order Form, in folder Order, did you change the order parameter from “Unreleased” to “All”? Is Prior Reservations Only checked? If so, uncheck it. If it is checked; only orders with reservations will be released.
    Regards,
    Ketter Ohnes

  • How to get all rows that are returned in inner sub query of select statemen

    If a sub query in select statement returns more than one row than how to get all those returned rows in the final
    output of the query .It will be all right if all column's value repeat and that multiple output of inner query comes
    in another column .
    How to get that ?

    As Frank said, you likely want a join, and likely an outer join to replicate the select in the projection. Something like:
    SELECT id,stat, section, USER_ID concerned_person
    FROM table_all,
      left join table2
        on room_id = sectoion and
           sur_role = 'r001'
    WHERE section IN (SELECT code
                      FROM t_area
                      WHERE dept= 'p002')An alternative, depending on where and how you are using the statement would be something like:
    SQL> WITH t AS (
      2    select 1 id from dual union all
      3    select 2 id from dual),
      4  t1 as (
      5    select 1 id, 'One' descr from dual union all
      6    select 1, 'Un' from dual union all
      7    select 1, 'Une' from dual)
      8  SELECT t.id, CURSOR(SELECT t1.id, t1.descr from t1
      9                      WHERE t1.id = t.id)
    10  FROM t;
                      ID CURSOR(SELECTT1.ID,T
                       1 CURSOR STATEMENT : 2
    CURSOR STATEMENT : 2
                      ID DESCR
                       1 One
                       1 Un
                       1 Une
                       2 CURSOR STATEMENT : 2
    CURSOR STATEMENT : 2
    no rows selectedJohn

  • When i was trying to update my iPhone 5s to the latest version of ios 8.1 , it required more space so i had to delete data manually, meanwhile i was doing so the phone got stuck and went off & when it came on again i found it on the recovery mode  ??

    hello there everyone
    I lost everything cause I wanted to update my phone
    here is what happened with me exactly :-
    I plugged in my phone into the charger  & connected my phone to a wireless connection to  start the operation of updating it, I immediately noticed that I dont have the required space to proceed the download so i had to delete data manually, & meanwhile i was doing so my phone became slow  and it got stuck then it went off after that it came on again but it was on the recovery mode ??
    did I lose everything ??? what did I do wrong  ??? what can i do to recover this ??

    Hi, Milanista5
    Thank you for visiting Apple Support Communities.
    When experiencing issues restoring or updating an iPhone, here are the best articles to go through.  If you received a specific error number when restoring, see the section labeled Get more help in the second article below.
    iOS: Unable to update or restore
    http://support.apple.com/kb/ht1808
    iOS: Troubleshooting update and restore issues
    http://support.apple.com/kb/ts1275
    Cheers,
    Jason H.

  • TS3694 hi i recently updated into ios 7.0.4 now i want to fully restore my ipad to resell but when i restore it it got stuck with apple logo and progress bar with 45% completed as firware file is downloaded using ipad 4 wifi itunes 11.3.8

    hi i rescently updated my ipad 4 in ios 7.0.4 and for resell purpose i want to restore my ipad via itunes but it got stuck at apple logo and progress bar of 45% completed i tried it 50 times but it stuck on that exact point for hours i cant able to restore it and had no errors it just like freezes at one point i also uses dfu mode but got stuck at same problem using windows 7 32 bits itunes 11.3.8 ipad 4 wifi please help

    My iPhone 5 wouldn't start after I turned it off a few minutes after writing this. It went into recovery mode and I had no choice but to connect to iTunes on PC and restore.
    I restored to factory setting first, just to validate my phone was okay. For a second consecutive iOS update, the  iPhone 5 did not update smoothly while connected to PC and iTunes - I had to retry two times before the progress bar for the update showed. (The exact same problem with the restart occured when I updated to 7.0.4.)
    The good news is that I was ultimately able to restore the iPhone 5 to factory settings while running iOS 7.0.6. I did have a backup from about a month ago lying around and was able to successfully restore with that as well, so the damage done is almost negligible since I had my contacts, notes, mail, etc. backed up to iCloud.
    Once I completed both restores, the sync with iTunes worked fine.

  • My iphone 4 got stuck on the itunes logo. I had to restore it and have lost everything. Is there anything I can do to get my photos back?

    Hello. My iphone 4 got stuck on the itunes logo. I had to restore it and have lost everything. Is there anything I can do to get my photos back?

    Not easily, the recovery mode erases the device, but you can see if any of these data recovery tools may work: https://discussions.apple.com/docs/DOC-1689

  • Help =( Mac got stuck on gray screen

    Hi
    Update went ok a couple of days ago.
    Tonight it suddently got "stuck" and after rebooting it, it is now stuck on a gray screen.
    Impossible to reboot from the installation disk or from my Lacie disk or from the HD.
    When attempting to reboot from the Leopard installation disk, I then get a message telling me that the Mac needs to be restarted, but when I restart, I get stuck again on the gray screen with the Apple logo in the middle.
    I am at a loss as to what to do.
    Help, please!!! I am now on a friend's computer to access help. So a quick response from someone would be fantastic.
    Anyone?

    update on current situation:
    i took my macbook to be repaired first thing this morning.
    it is apparently a small part that is damaged and therefore preventing the macbook to reboot.
    hence why the hardware test indicated that it found no problems and that when attempting to reboot from a disk or a drive, it finds them, but cannot reboot from either.
    the part should be here tomorrow afternoon and i should get my macbook back either tomorrow or thursday.
    apparently, it is nothing serious and no loss of data should occurr.
    but they will only know this for sure once the part has been replaced and they can actually reboot it. they say this is not linked with the leopard update.
    just sheer bad luck from a defective part.

  • How do I use icloud to restore my documents that were in Pages? Pages got stuck in "waiting" to update and when nothing else worked I deleted it and reloaded Pages. I don't want to restore everything just my Pages documents.

    How do I use icloud to restore my documents that were in Pages? Pages got stuck in "waiting" to update and when nothing else worked I deleted it and reloaded Pages. Everything I can find is about wiping everything out and restoring everything. I don't want to restore everything just my Pages documents (and numbers and keynote that also locked up during updating).

    What I meant is turn off Documents and Data in iCloud in OS X. Keep it on on your iOS devices. iCloud will sync documents between the iOS devices and make them available on the iCloud web site, but it won't mess up iWorks' open and save dialog boxes. It also won't assume that you want all your documents in iCloud, which I think is undesirable anyway.
    Keep iOS and OS X separate, and use the web site to move files between the two as necessary.
    iOS iWork is different from OS X iWork. There are fewer fonts on an iOS device. iOS iWork programs have slightly different feature sets than OS X iWork programs, and the file formats are different. iCloud automatically converts the file format when necessary, but if you make a habit of saving things directly to iCloud, you are limited to the lowest common denominator between the two versions of iWorks. So why would anyone want iWork on the Mac to open and save documents on iCloud by default?
    If you want to store files in the cloud and sync them on your Macs, SugarSync is a much better solution. It lets you choose your sync folders, it doesn't make you reorganize your files, it lets you sync all file types, it doesn't convert files to a different format and back, and it stores everything in the cloud, too. Just the simle act of saving a file backs it up and syncs it. I wouldn't live without it. iCloud is best with iTunes purchases and synchronizing Mac settings and iOS files; I woudln't live without it. The two make an unbeatable combination.

  • While updating my ipad to new software through itunes it got stuck and does not work anymore - it just displays the screen with symbols of itunes and the cable to connect to it - help - what should i do?

    while updating my ipad to new software through itunes it got stuck and does not work anymore - it just displays the screen with symbols of itunes and the cable to connect to it - help - what should i do?

    Disconnect the iPad, do a Reset [Hold the Home and Sleep/Wake buttons down together for 10 seconds or so (until the Apple logo appears) and then release. The screen will go blank and then power ON again in the normal way.] It is 'appsolutely' safe!, reconnect and follow the prompts.
    If that does not work then see here http://support.apple.com/kb/HT1808

  • Can someone please help me with a sub query question?

    I need to list a 3rd party contract and then a list of students who belong to that contract.
    On the students segment of the listing I need to show students with student id, name, total credit hours,
    total amount spent on tuition, total amount spent on books and total amount spent on misc.
    This code has a query for the contract information and I get that just fine.
    Then it has a query that gives me total credit hours and that works fine
    then it has a query that gives me total amount spent on tuition and that works fine
    but
    when I add the next query to get total amount spent on books I get only the information for the contract, I don't get student stuff anymore.
    I would really appreciate any guidance that you could give.
    Thanks in advance, Bob Hohulski
    DECLARE
    l_conn utl_TCP.connection;
    v_filehandle utl_file.file_type;
    v_output varchar2(1000);
    v_contract_id varchar2(9);
    v_contract_addr1 varchar2(30);
    v_contract_addr2 varchar2(30);
    v_contract_city varchar2(20);
    v_contract_stat varchar2(03);
    v_contract_zip varchar2(10);
    v_contract_name varchar2(60);
    v_student_id varchar2(09);
    v_student_first_name varchar2(15);
    v_student_mid_name varchar2(15);
    v_student_last_name varchar2(60);
    v_last_out varchar2(20);
    v_student_detail_code varchar2(04);
    v_student_amount number(12,2);
    v_student_ref_number varchar2(09);
    v_credit_hrs number(7,2);
    v_tuition_amount number(12,2);
    v_books_amount number(12,2);
    v_misc_amount number(12,2);
    v_total_for_student number(12,2);
    v_current_student varchar2(09);
    v_sftregs_pidm varchar2(09);
    v_tbraccd_pidm varchar2(09);
    CURSOR c_sel_contract IS
    SELECT DISTINCT spriden_id, spriden_last_name,
    spraddr_street_line1, spraddr_street_line2,
    spraddr_city, spraddr_stat_code, spraddr_zip
    FROM spriden, spraddr
    -- WHERE spriden_id = '&Enter_Id'
    where spriden_id = 'T10474666'
    AND spriden_pidm = spraddr_pidm
    AND SPRIDEN_CHANGE_IND IS NULL;
    CURSOR c_sel_student IS
    SELECT DISTINCT spriden_id, spriden_first_name, spriden_mi, spriden_last_name,
    sftregs_credit_hr,
    tbraccd_amount,
    sftregs_pidm,
    tbraccd_pidm
    FROM spriden, tbraccd, tbbcstu, sftregs
    WHERE 559220 = tbbcstu_contract_pidm
    AND spriden_pidm = tbraccd_pidm
    AND spriden_pidm = tbbcstu_stu_pidm
    AND spriden_pidm = sftregs_pidm
    AND (sftregs_pidm, sftregs_credit_hr) IN
    (SELECT DISTINCT sftregs_pidm, SUM(sftregs_credit_hr)
    FROM sftregs, tbbcstu, spriden
    WHERE sftregs_term_code = '201010'
    AND sftregs_pidm = tbbcstu_stu_pidm
    AND sftregs_pidm = spriden_pidm
    GROUP BY sftregs_pidm)
    AND (tbraccd_pidm, tbraccd_amount) IN
    (SELECT DISTINCT tbraccd_pidm, SUM(tbraccd_amount)
    -- tuition
    FROM tbraccd, tbbcstu, spriden
    WHERE tbraccd_term_code = '201010'
    AND (tbraccd_detail_code = 'TU01' OR
    tbraccd_detail_code = 'TU02' OR
    tbraccd_detail_code = 'TU03' OR
    tbraccd_detail_code = 'TU04')
    AND tbraccd_pidm = tbbcstu_stu_pidm
    AND tbraccd_pidm = spriden_pidm
    GROUP BY tbraccd_pidm)
    --this code works up to this point
    --when I add the next query I get nothing
    AND (tbraccd_pidm, tbraccd_amount) IN
    (SELECT tbraccd_pidm, SUM(tbraccd_amount)
    books
    FROM tbraccd, tbbcstu
    WHERE tbraccd_term_code = '201010'
    AND (tbraccd_detail_code = 'BKSU' OR
    tbraccd_detail_code = 'BKCH')
    AND tbraccd_pidm = tbbcstu_stu_pidm
    GROUP BY tbraccd_pidm, tbraccd_amount)
    --AND (tbraccd_pidm, tbraccd_amount) IN
    -- (SELECT tbraccd_pidm, SUM(tbraccd_amount)
    -- misc
    -- FROM tbraccd, tbbcstu
    -- WHERE tbraccd_term_code = '201010'
    -- AND tbraccd_pidm = tbbcstu_stu_pidm
    -- AND (tbraccd_detail_code = 'AUNA' OR
    -- tbraccd_detail_code = 'OTPB')
    -- GROUP BY tbraccd_pidm, tbraccd_amount)
    --ORDER BY tbraccd_pidm, spriden_first_name, spriden_mi, spriden_last_name,
    -- tbbcstu_sponsor_ref_number, sftregs_credit_hr;
    ORDER BY tbraccd_pidm;
    BEGIN
    v_filehandle := utl_file.fopen(location => 'UTLFILE_MISAP9',
    filename => 'ban_matrix.dat',
    open_mode => 'w',
    max_linesize => 32767);
    OPEN c_sel_contract;
    LOOP
    DBMS_OUTPUT.PUT_LINE('looping');
    FETCH c_sel_contract INTO v_contract_id, v_contract_name,
    v_contract_addr1, v_contract_addr2,
    v_contract_city, v_contract_stat,
    v_contract_zip;
    EXIT WHEN c_sel_contract%NOTFOUND;
    v_output :=
    nvl(rpad(v_contract_id,9),rpad(' ',9)) ||
    ' ' ||
    nvl(rpad(v_contract_name,60),rpad(' ',60));
    utl_file.put_line(v_filehandle,v_output);
    v_output :=
    nvl(rpad(v_contract_addr1, 30),rpad(' ',30)) ||
    ' ' ||
    nvl(rpad(v_contract_addr2, 30),rpad(' ',30));
    utl_file.put_line(v_filehandle,v_output);
    v_output :=
    nvl(rpad(v_contract_city, 20), rpad(' ',20)) ||
    ' ' ||
    nvl(rpad(v_contract_stat, 3), rpad(' ',3)) ||
    ' ' ||
    nvl(rpad(v_contract_zip, 10), rpad(' ',10));
    utl_file.put_line(v_filehandle,v_output);
    utl_file.new_line(v_filehandle);
    OPEN c_sel_student;
    LOOP
    FETCH c_sel_student into v_student_id, v_student_first_name, v_student_mid_name,
    v_student_last_name,
    v_credit_hrs,
    v_tuition_amount,
    v_sftregs_pidm,
    v_tbraccd_pidm;
    -- v_books_amount, v_misc_amount;
    EXIT WHEN c_sel_student%NOTFOUND;
    v_last_out := substr(v_student_last_name, 1, 20);
    v_output :=
    nvl(rpad(v_student_id, 09),rpad(' ',09)) ||
    ' ' ||
    nvl(rpad(v_student_first_name, 15),rpad(' ',15)) ||
    nvl(rpad(v_student_mid_name, 15),rpad(' ',15)) ||
    nvl(rpad(v_last_out, 20),rpad(' ',20)) ||
    ' ' ||
    nvl(rpad(v_student_ref_number, 09),rpad(' ',09)) ||
    ' ' ||
    v_credit_hrs ||
    ' ' ||
    v_tuition_amount ||
    -- v_books_amount ||
    -- ' ' ||
    -- v_misc_amount;
    utl_file.put_line(v_filehandle,v_output);
    END LOOP;
    END LOOP;
    --EXCEPTION
    --WHEN OTHERS THEN
    -- DECLARE
    -- err_msg VARCHAR2(100);
    -- BEGIN
    -- err_msg := 'ERR- '||SUBSTR(SQLERRM, 1,100);
    -- - utl_file.put_line(v_filehandle,err_msg);
    --END;
    utl_file.fclose(v_filehandle);
    CLOSE c_sel_contract;
    CLOSE c_sel_student;
    --END AR_MATRIX_PROC;
    END;

    run this original query
    SELECT DISTINCT spriden_id,
            spriden_first_name,
            spriden_mi,
            spriden_last_name,
            sftregs_credit_hr,
            tbraccd_amount,
            sftregs_pidm,
            tbraccd_pidm
       FROM spriden, tbraccd, tbbcstu, sftregs
    WHERE 559220 = tbbcstu_contract_pidm
       AND spriden_pidm = tbraccd_pidm
       AND spriden_pidm = tbbcstu_stu_pidm
       AND spriden_pidm = sftregs_pidm
       AND (sftregs_pidm, sftregs_credit_hr) IN (SELECT DISTINCT sftregs_pidm, SUM(sftregs_credit_hr)
                                                   FROM sftregs, tbbcstu, spriden
                                                  WHERE sftregs_term_code = '201010'
                                                    AND sftregs_pidm = tbbcstu_stu_pidm
                                                    AND sftregs_pidm = spriden_pidm
                                                 GROUP BY sftregs_pidm)
       AND (tbraccd_pidm, tbraccd_amount) IN (SELECT DISTINCT tbraccd_pidm, SUM(tbraccd_amount)
                                              -- tuition
                                                FROM tbraccd, tbbcstu, spriden
                                               WHERE tbraccd_term_code = '201010'
                                                 AND (tbraccd_detail_code = 'TU01' OR
                                                      tbraccd_detail_code = 'TU02' OR
                                                      tbraccd_detail_code = 'TU03' OR
                                                      tbraccd_detail_code = 'TU04')
                                                 AND tbraccd_pidm = tbbcstu_stu_pidm
                                                 AND tbraccd_pidm = spriden_pidm
                                               GROUP BY tbraccd_pidm)
       AND (tbraccd_pidm, tbraccd_amount) IN (SELECT tbraccd_pidm, SUM(tbraccd_amount) books
                                                FROM tbraccd, tbbcstu
                                               WHERE tbraccd_term_code = '201010'
                                                 AND (tbraccd_detail_code = 'BKSU' OR
                                                      tbraccd_detail_code = 'BKCH')
                                                 AND tbraccd_pidm = tbbcstu_stu_pidm
                                              GROUP BY tbraccd_pidm, tbraccd_amount)
    ORDER BY tbraccd_pidm;then run this sub-query:
    SELECT tbraccd_pidm, SUM(tbraccd_amount) books
       FROM tbraccd, tbbcstu
      WHERE tbraccd_term_code = '201010'
        AND (tbraccd_detail_code = 'BKSU' OR
             tbraccd_detail_code = 'BKCH')
       AND tbraccd_pidm = tbbcstu_stu_pidm
    GROUP BY tbraccd_pidm, tbraccd_amount)see if you have a matching tbraccd_pidm and tbraccd_amount between the two results.

  • IPhone3G got stuck on connect to iTunes screen while doing upgrade iOS 4.2

    Right after my iTunes 10.1 downloaded the iOS 4.2, it automatically started installing and sync-ing to my phone as usual.
    It restarted itself, apple logo came out and ...
    1. Stuck on "connect to itunes" screen eventough it was connected for the whole time. Unplugged it and plugged it back in, still got the same screen.
    2. Neither my PC or itunes recognize it at all.
    3. Unable to do soft reset but hard reset is ok. When i turn it on, the same screen comes out after the apple logo and got stuck until it turns itself off in about 30 sec.
    3. Tried to connect it to the usb/itunes many different ways when the "connect to itunes" screen is on, but still got the same result.
    4. Tried to do factory reset by holding the home button and connect it to the usb until the itunes recognize it, but still no luck (u can be sure on that it was properly done since it's not the first time i'm doing it).
    FYI: the phone has never been serviced or customized.
    Need some help ASAP here ppl. Please!
    Message was edited by: Barsaa

    I'm having the same problem too. I've been trouble shooting it based off advice from Apple's website and other people's information but so far nothing has worked. When I turn it on, it says connect to iTunes. I do. When I can get iTunes to recognize the iPhone is plugged in (which I seem to be able to only do when I stop and restart the Apple Mobile Device service), it says the phone is in recovery mode and has to be restored. I go through the process and so far it always stops on the "preparing iPhone for restore" process. Then I get the following error message ... the iPhone "iPhone could not be restored. An unknown error occured (1604). I seem to keep getting the 1604 and I haven't found a workable resolution yet for it.
    If anyone could help, I would be so appreciative.

  • A few days ago i small piece of plastic got stuck and subsequently fell out the charger hole of my ipod classic, although it still connects to itunes and syncs itunes says it has synced but there is nothing on my ipod! Nothing seems to work! HELP! :/

    A few days ago i small piece of plastic got stuck and subsequently fell out the charger hole of my ipod classic, although it still connects to itunes and syncs itunes says it has synced but there is nothing on my ipod! I have done this a few times and nothing seems to work! HELP! :/

    Transfer all of your content to the computer:
    Tunes Store: Transferring purchases from your iPhone, iPad, or iPod to a computer
    http://support.apple.com/kb/HT1848
    Then try turning the device off and on again. I'd leave it off for 10-15 minutes, but that is up to you:
    http://support.apple.com/kb/HT1430
    If the item is still there, you may need to restore the device:
    http://support.apple.com/kb/HT1414
    Hope that helps . Worst case scenario, you may need to write into iTunes support to see if they can also help!!

  • My on and off button got stuck is there any way to fix it?

    I have a Ipod Nano 6th Gen and i was just laying down listening to music when i tried to shuffle it by double clicking and the button got stuck. I just want to know if there is anyway to get it unstuck or will i have to get another one.

    I had the same problem with my iPod touch 4th gen.
    1. Reset
    You can hold the on/off button and the home button at the same time. Don't release until the screen goes black and the apple logo appears. After doing this it should restart your iPod completely.
    But depending on the screen problem, this may or may not work.
    If the first solution doesn't work, then try this:
    2. Restore
    You can restore it to factory settings if you sync it with your computer.
    If you can do this (sync with your iMac) then when you plug it in, go onto iTunes, and when it reconnizes your device it should have a section on the sidebar that says "iPod touch". Click on that, then click "restore iPod". It may confirm it and you will probably have to enter your Apple ID.
    ***Beware that with this method, all the data on your iPod will be lost***
    If this does not work, and your device is now restored, don't worry, you can get the data back and your iPod will be as normal.
    I hope this helps, sorry for any spelling errors, I'm only 13
    Happy New Year, and hopefull you can get your iPod fixed!!

Maybe you are looking for

  • Consingment stock report with values

    Hello guys, I need one standard report, which includes amounts (values in money) of consignment stock. Could you please help ? Thanks guys ! Best regards, Laimonas

  • How to migrate to ext4

    Hi guys, I have a very old archlinux installation on my netbook. I now want to migrate to ext4 with converting my HD completely to ext4 (not only mounting it as ext4). Is it ok to backup my HD with dd and recover it afterwards directly on my netbook

  • Retrieving records at a single fetch !!!

    Hi All. there is a big qns in my mind. Let me explain the problem first. I want to retrieve some 1000 records from the database but want to show 10 records per page. while clicking next or somthing the 2nd page i want show 10 records. Is this case, t

  • Base page navigate to other OA page on event pop-up

    Hi, i should open a pop-up window on an event in OA page. where popup have 'Yes' 'No' button if it is yes then the base page should navigate to other page if 'No' then it remain in same page and popup window should exit and focus should be on the bas

  • Screen orientation is locked in landscape mode

    Screen orientation is locked in landscape mode.