Help me in this procedure

hi all ,
i have a question pls ...
i have to desgin like a internet shopping page ... i mean i will collect customer order from x table
for item_details in ( select ,,,,,,,,,,,,,,,,,,,, ) loop
end loop';
i will get this output
item id itme price send
12 678 $ {  here is a send button}
23 0900$ {  here is a send button}
when the user click on send button it will send it to another page for payment purposes ....
the question is i want to send the item id from one procedure to another but how??? i will user formhidden but i am getting those data from a loop
so how i can recognize that item id the one i send it????

Without a version number, DDL, and DML I don't see how we can help you.
How you send a parameter from one procedure to another can be easily demonstrated:
http://www.morganslibrary.org/reference/procedures.html
How any of this connects with your web application is something you will need to work with in a forum dedicated to that technology.

Similar Messages

  • Please help me with this procedure

    Hi guys. i am trying to create a procedure that inserts into the withdrawal table and then prints out the balance of the user. Again i have created a function called get_authority that checks if the user is authorized or not. i have been able to write the procedure but still get an error. please help me correct my mistake. thank u
    create or replace procedure do_withdrawal(
    p_cust_id in varchar2,
    p_acc_id in number,
    p_amount in number
    as
    v_cnr number(9);
    unauthorized Exception;
    begin
    select pk_seq.nextval into v_cnr from dual;
    insert into deposition(wit_id,cust_id,acc_id,amount,date_time ) values(v_cnr,p_cust_id,p_acc_id,p_amount,sysdate);
    commit;
    EXCEPTION
       when (get_authority = 0;) then
         Raise unauthorized,
       dbms_output.put_line('Unauthrorized User')
         else
            dbms_output.put_line('Dear Customer: Your balance is ')
    end;

    1002942 wrote:
    Hi guys. i am trying to create a procedure that inserts into the withdrawal table and then prints out the balance of the user. Again i have created a function called get_authority that checks if the user is authorized or not. i have been able to write the procedure but still get an error. please help me correct my mistake. thank u
    Just had a look on your procedure and modified your approach by assuming that you must be knowing what are going to achieve. Even your inputs look unclear and insufficient.
    -- Not tested
    create or replace procedure do_withdrawal(
    p_cust_id in varchar2,
    p_acc_id in number,
    p_amount in number
    is
    v_cnr number(9);   -- no need
    unauthorized Exception; -- no need
    begin
    --select pk_seq.nextval into v_cnr from dual;
    -- use seq directly
    if get_authority = 0 then
      raise_application_error(-20001, 'Unauthrorized User');
    else
      insert into deposition(wit_id,
           cust_id,
           acc_id,
           amount,
           date_time)
        values(pk_seq.nextval,
         p_cust_id,
         p_acc_id,
         p_amount,
         sysdate);
      commit;
      dbms_output.put_line('Dear Customer: Your balance is '||p_amount);
        end if; 
    exception
       when others then raise;  -- if you still want to catch some undefined error, then just raise it
    end;

  • Help me with this procedure

    Experts,
    Purpose of the below Procedure to print each word of the whole sentence.
    splitting character is ','
    but it didn't serve the purpose. It prints the 1st set of words like ,
    haisai
    and 24
    but it's NOT getting the demosai & 42 values.
    create or replace procedure splittxt is
    txt varchar2(200):='haisai,24,demosai,42';
    txt1 varchar2(10);
    txt2 varchar2(10);
    len number(2);
    begin
    loop
    len :=length(txt);
    txt1 := substr(txt,1, instr(txt,',')-1);
    txt2 := substr(txt, instr(txt,',',1,1)+1, instr(txt,',',1,2) - instr(txt,',',1,1)-1);
    dbms_output.put_line(txt1);
    dbms_output.put_line(' and '||txt2);
    txt1:="";
    txt2:="";
    if txt2=42 then
    exit;
    end if;
    end loop;
    end;
    Any help is appreciated.
    Thanks,
    Seetharaman.

    How about using a pipilined function?
    You could call that from SQL*Plus as well:
    SQL> create or replace function split_it
      2  (p_str in varchar2)
      3  return sys.odcivarchar2list
      4  pipelined
      5  is
      6  begin
      7    for rec in (select substr (p_str,
      8                               instr (p_str, ',', 1, level  ) + 1,
      9                               instr (p_str, ',', 1, level+1) - instr (p_str, ',', 1, level) -1
    10                              ) col
    11                from ( select ','||p_str||',' p_str
    12                       from   dual
    13                      )
    14                connect by level <= length(p_str)-length(replace(p_str,',',''))-1
    15               )
    16    loop
    17      pipe row (rec.col);
    18    end loop;
    19    return;
    20  end;
    21  /
    Function created.
    SQL> select * from table(split_it('haisai,24,demosai,42'));
    COLUMN_VALUE
    haisai
    24
    demosai
    42

  • Help me in debugging this procedure

    PROCEDURE p_main_dpn (
    m_post IN OUT VARCHAR2,
    m_company VARCHAR2,
    m_user_group VARCHAR2,
    m_user_id VARCHAR2,
    m_choice VARCHAR2,
    m_year VARCHAR2,
    m_period VARCHAR2,
    m_tot_count NUMBER,
    g_asset_code VARCHAR2
    IS
    CURSOR c1 (m_last_day_of_period DATE)
    IS
    SELECT company, asset_code, asset_dept, capital_cost, current_wdv,
    dpn_type, status, residual_val, dpn_prd, dpn_year, nl_intf,
    asset_life, updated_wdv, dpn_date, comm_date
    FROM fa_asset_reg
    WHERE status = 'C'
    AND company = m_company
    AND asset_code =
    NVL (g_asset_code, asset_code)
    -- dpn before sale
    AND updated_wdv > residual_val
    AND TO_NUMBER (TO_CHAR (NVL (dpn_date, comm_date), 'yyyymmdd')) <
    TO_NUMBER (TO_CHAR (m_last_day_of_period, 'yyyymmdd'))
    ORDER BY asset_dept;
    rc1 c1%ROWTYPE;
    sl_value NUMBER (15, 2);
    -- Used in Sraight Line Method Calculation
    sl_dpn NUMBER (15, 2); -- Straight Line depreciation amount
    rb_value NUMBER (15, 2);
    -- Used in Reducing Balance Method Calculation
    rb_dpn NUMBER (15, 2);
    -- Reducing Balance depreciation amount
    m_doc_ref VARCHAR2 (16); -- For generating new Doc-Ref
    m_updated_wdv NUMBER (15, 2); -- Latest book value of the Asset
    m_tot_dpn NUMBER (15, 2); -- Department-wise total depreciation
    m_loop_count NUMBER; -- To check for First Loop
    m_prev_dept VARCHAR2 (12);
    m_next_dept VARCHAR2 (12);
    period_last_day DATE; --*
    m_period_days NUMBER; --*
    m_dpn_days NUMBER; --* used for datewise DPN calculation
    dpn_for_a_day NUMBER; --*
    m_last_day DATE; --*
    m_start_day DATE; --*
    m_from_day DATE; --*
         Chk Number;
    BEGIN
    /* First Delete any Trial Depreciations Calculated */
    DELETE FROM fa_temp_dpn
    WHERE company = m_company;
    Chk :=1;
    BEGIN
    /* This check is done to calculate dpn before sale for a particular asset*/
    IF g_asset_code IS NULL
    THEN
    SELECT LAST_DAY (fdp), LAST_DAY (fdp) - fdp + 1, fdp
    INTO m_last_day, m_period_days, m_start_day
    FROM sm_calendar
    WHERE company = m_company AND YEAR = m_year AND prd = m_period;
                   DBMS_OUTPUT.PUT_LINE('m_last_day, m_period_days, m_start_day'||m_last_day||','|| m_period_days||','|| m_start_day);
    ELSE
    SELECT SYSDATE, LAST_DAY (fdp) - fdp + 1,
    TRUNC (SYSDATE - fdp) + 1, fdp
    INTO m_last_day, m_period_days,
    m_dpn_days, m_start_day
    FROM sm_calendar
    WHERE company = m_company AND YEAR = m_year AND prd = m_period;
    END IF;
    EXCEPTION
    WHEN NO_DATA_FOUND
    THEN
    m_post := 'System calendar not defined properly';
    END;
    --OPEN c1 (m_last_day);
    FOR RC1 IN C1(m_last_day)
    LOOP
         cHK := 0;
    /*FETCH c1
    INTO rc1;*/
              cHK := 0.1;
    dbms_OUTPUT.PUT_LINE('ENtered the loop'||c1%rowcount||m_last_day);
    EXIT WHEN c1%NOTFOUND or c1%rOWCOUNT = 0;ADDED BY ALOK
              cHK := 0.2;
    m_loop_count := NVL (m_loop_count, 0) + 1;
              cHK := 0.3;
              DBMS_OUTPUT.PUT_LINE('m_loop_count '||m_loop_count );
    -- No more depreciation for the Asset which has depreciated
    -- upto the Residual Value!!
    rb_dpn := NULL;
    sl_dpn := NULL;
    -- SLL or SL% METHOD
    IF rc1.dpn_type = 'S' OR rc1.dpn_type = 'P'
    THEN
    -- Provision is given for adding already depreciated assets into the register.****
    sl_value := NVL (rc1.current_wdv, NVL (rc1.capital_cost, 0));
    DBMS_OUTPUT.put_line ('SL Value ' || sl_value);
    IF rc1.dpn_type = 'S'
    THEN -- SLL METHOD
    sl_dpn := (sl_value - rc1.residual_val) / rc1.asset_life;
    DBMS_OUTPUT.put_line
    ( 'sl_dpn := (SL_VALUE - rc1.residual_val)/rc1.asset_life'
    || sl_dpn
    ELSIF rc1.dpn_type = 'P'
    THEN -- SL% METHOD
    sl_dpn :=
    ((sl_value - rc1.residual_val) * rc1.asset_life) / 100;
    DBMS_OUTPUT.put_line
    ( 'sl_dpn := ((SL_VALUE - rc1.residual_val)*rc1.asset_life)/100'
    || sl_dpn
    END IF;
    -- Dpn Calculation for no. of days in the period.
    dpn_for_a_day := sl_dpn / m_period_days;
                   DBMS_OUTPUT.put_line('dpn_for_a_day '||dpn_for_a_day );
    IF g_asset_code IS NULL
    THEN
    -- Get the no. of days from rc1.dpn_date to last_day of current period.
    IF rc1.dpn_date = rc1.comm_date
    THEN
    -- Dpn calculation for the first time.
    m_start_day := rc1.dpn_date;
                        DBMS_OUTPUT.put_line('m_start_day '||m_start_day);
    END IF;
    ELSE
    IF TO_CHAR (m_start_day, 'MMYYYY') =
    TO_CHAR (rc1.comm_date, 'MMYYYY')
                   THEN
    m_start_day := rc1.comm_date;
                        DBMS_OUTPUT.put_line('TO_CHAR (m_start_day, ''MMYYYY'')'||TO_CHAR (m_start_day, 'MMYYYY'));
    ELSE
    m_start_day := rc1.dpn_date + 1;
    END IF;
    END IF;
    m_dpn_days := TRUNC (m_last_day - m_start_day) + 1;
    DBMS_OUTPUT.put_line('m_dpn_days '||m_dpn_days);
    -- Compare the days for which depreciation has to be calculated with the
    -- no. of days in the period.
    IF m_dpn_days > m_period_days
    THEN
    m_post :=
    'Depreciation has not been done for a previous period.';
    EXIT;
    ELSE
    -- Restore the DPN into same variable
    sl_dpn := dpn_for_a_day * m_dpn_days;
                   DBMS_OUTPUT.put_line('sl_dpn '||sl_dpn);
    END IF;
    Chk := 2;
    -- Update the Current Value of this Asset(SL)
    m_updated_wdv := rc1.updated_wdv - sl_dpn;
    -- RBL OR RB% METHOD
    ELSIF rc1.dpn_type = 'R' OR rc1.dpn_type = 'Q'
    THEN
    rb_value :=
    NVL (rc1.updated_wdv,
    NVL (rc1.current_wdv, NVL (rc1.capital_cost, 0))
    Chk :=3;
    IF rc1.dpn_type = 'R'
    THEN
    rb_dpn := (rb_value - rc1.residual_val) / rc1.asset_life;
    ELSIF rc1.dpn_type = 'Q'
    THEN
    rb_dpn :=
    ((rb_value - rc1.residual_val) * rc1.asset_life) / 100;
    END IF;
    -- Dpn Calculation for no. of days in the period.
    dpn_for_a_day := rb_dpn / m_period_days;
    IF g_asset_code IS NULL
    THEN
    -- Get the no. of days from rc1.dpn_date to last_day of current period.
    IF rc1.dpn_date = rc1.comm_date
    THEN
    -- Dpn calculation for the first time.
    m_start_day := rc1.dpn_date;
    END IF;
    ELSE
    IF TO_CHAR (m_start_day, 'MMYYYY') =
    TO_CHAR (rc1.comm_date, 'MMYYYY')
    THEN
    m_start_day := rc1.comm_date;
    ELSE
    m_start_day := rc1.dpn_date + 1;
    END IF;
    END IF;
    m_dpn_days := TRUNC (m_last_day - m_start_day) + 1;
    -- Compare the days for which depreciation has to be calculated with the
    -- no. of days in the period.
    IF m_dpn_days > m_period_days
    THEN
    m_post :=
    'Depreciation has not been done for previous a period.';
    EXIT;
    ELSE
    -- Restore the DPN into same variable
    rb_dpn := dpn_for_a_day * m_dpn_days;
    END IF;
    Chk := 4;
    -- Update the Current Value of this Asset(RB)
    m_updated_wdv :=
    NVL (rc1.updated_wdv,
    NVL (rc1.current_wdv, NVL (rc1.capital_cost, 0))
    - rb_dpn;
    END IF;
    -- Check if the depreciation reduces the current book value
    -- to make it lesser than Residual Value
    IF m_updated_wdv < rc1.residual_val
    THEN
    IF rc1.dpn_type = 'S' OR rc1.dpn_type = 'P'
    THEN
    sl_dpn := sl_dpn - (rc1.residual_val - m_updated_wdv);
    ELSIF rc1.dpn_type = 'R' OR rc1.dpn_type = 'Q'
    THEN
    rb_dpn := rb_dpn - (rc1.residual_val - m_updated_wdv);
    END IF;
    m_updated_wdv := rc1.residual_val;
    END IF;
    m_from_day := m_start_day;
    Chk := 5;
    -- Check whether Department-wise AJ consolidation required.
    IF m_choice = 'Y'
    THEN /* Department-wise AJ required */
    INSERT INTO fa_stats
    (company, asset_code, closing_wdv, YEAR,
    prd, dpn_per_day, no_of_days, from_date,
    TO_DATE, asset_dpn, usr_id, TIMESTAMP
    VALUES (rc1.company, rc1.asset_code, m_updated_wdv, m_year,
    m_period, dpn_for_a_day, m_dpn_days, m_from_day,
    m_last_day, NVL (rb_dpn, sl_dpn), m_user_id, SYSDATE
                   DBMS_OUTPUT.PUT_LINE('Inserted the value into Fa_Stats');
    UPDATE fa_asset_reg
    SET dpn_year = m_year,
    dpn_prd = m_period,
    dpn_date = m_last_day,
    updated_wdv = m_updated_wdv
    WHERE company = m_company AND asset_code = rc1.asset_code;
                             DBMS_OUTPUT.PUT_LINE(SQL%ROWCOUNT||'Rows Updated the value into Fa_Asset_Reg');
    m_next_dept := rc1.asset_dept;
    IF m_next_dept = NVL (m_prev_dept, m_next_dept)
    THEN /* same department */
    m_tot_dpn := NVL (m_tot_dpn, 0)
    + NVL (NVL (sl_dpn, rb_dpn), 0);
    m_prev_dept := m_next_dept;
    IF m_loop_count = m_tot_count
    THEN /* last record */
    p_create_dpn_jv (m_company,
    m_user_group,
    m_user_id,
    m_post,
    m_period,
    m_year,
    m_last_day,
    'XXXXXX',
    m_next_dept,
    m_choice,
    m_tot_dpn,
    m_updated_wdv,
    rc1.nl_intf,
    NULL,
    NULL,
    NULL,
    NULL
    --m_updated_wdv & m_last_day not applicable if CHOICE = 'Y'
    EXIT;
    END IF;
    END IF;
    IF m_next_dept <> m_prev_dept
    THEN
    p_create_dpn_jv (m_company,
    m_user_group,
    m_user_id,
    m_post,
    m_period,
    m_year,
    m_last_day,
    'XXXXXX',
    m_prev_dept,
    m_choice,
    m_tot_dpn,
    m_updated_wdv,
    rc1.nl_intf,
    NULL,
    NULL,
    NULL,
    NULL
    --m_updated_wdv & m_last_day not applicable if CHOICE = 'Y'
    m_tot_dpn := NVL (NVL (sl_dpn, rb_dpn), 0);
    m_prev_dept := m_next_dept;
    IF m_loop_count = m_tot_count
    THEN /* last record */
    p_create_dpn_jv (m_company,
    m_user_group,
    m_user_id,
    m_post,
    m_period,
    m_year,
    m_last_day,
    'XXXXXX',
    m_next_dept,
    m_choice,
    m_tot_dpn,
    m_updated_wdv,
    rc1.nl_intf,
    NULL,
    NULL,
    NULL,
    NULL
    --m_updated_wdv & m_last_day not applicable if CHOICE = 'Y'
    EXIT;
    END IF;
    END IF;
    ELSE
              Chk := 5.1; /* choice is N */
    p_create_dpn_jv (rc1.company,
    m_user_group,
    m_user_id,
    m_post,
    m_period,
    m_year,
    m_last_day,
    rc1.asset_code,
    rc1.asset_dept,
    m_choice,
    NVL (sl_dpn, rb_dpn),
    m_updated_wdv,
    rc1.nl_intf,
    dpn_for_a_day,
    m_dpn_days,
    m_from_day,
    m_last_day
                                       Chk := 5.2;
    END IF;
    END LOOP;
    -- CLOSE c1;
         cHK := 7;
    EXCEPTION
    WHEN NO_DATA_FOUND
    THEN
    m_post := 'Processing failed !! No data found ';
    WHEN DUP_VAL_ON_INDEX
    THEN
    m_post :=
    'Posting failed . Duplicate value exists for ' || rc1.asset_code;
    ROLLBACK;
              wHEN otHERS THEN
              m_post := 'ERROR oCCURED'||SQLERRM||chk||' '||m_loop_count;
              rOLLBACK;
    END;
    Here when i'm executing this procedure, I'm getting a error ORA-01002- Fetch Out of Sequence.
    Plz help me.
    Thanks in advance.
    Regards,ALok

    Earlier it was having the simple loop.But i changed
    it to the FOr loop cursor,
    Cos, For loop is more efficient in fetching the
    data.Only from 10g on and when you don't use BULK fetch
    in your cursor loop.
    As for your other question: I meant of course the ROLLBACK
    in the procedure p_create_dpn_jv.
    Again, if you can't remove that ROLLBACK there, you could
    bulk fetch all the records of your main cursor and process them
    afterwards in a FOR/FORALL loop, if the result fits into the available
    memory of course.
    C.

  • HELP TO TUNE THIS QUERY

    Hi,
    I'm using below query in procedure.It's taking more more time can some one help to tune this query or advice to rewrite the query.
    Databse :10.1
    SELECT   'Reading Comprehension' TEST_NAME,T.TEST_END_DATE TEST_SESSION_DATE,
            C.POOL_VERSION_ID, I.CREATED_ON POOL_CREATED_DT,
            C.ITEM_ID, C.ITEM_RESPONSE_ID, S.STUDENT_ID_PK, C.RESPONSE_KEY, C.IS_CORRECT RESPONSE_IS_CORRECT,
            T.SCORE SCALE_SCORE, C.RESPONSE_DURATION, P.ITEM_KEY,
            T.TEST_SESSION_DETAIL_ID, SYSDATE CREATED_ON
           -- BULK COLLECT INTO TV_PSYCHO_DET
            FROM
            CAT_ITEM_PARAMETER P, CAT_ITEM_USER_RESPONSE C, TEST_SESSION_DETAIL T,
            TEST_SESSION S, ITEM_POOL_VERSION I, TEST_DETAIL D
            ,INSTITUTION E
            WHERE  TRUNC(T.TEST_END_DATE) BETWEEN TO_DATE('01-11-09','dd-mm-yy') AND TO_DATE('30-11-09','dd-mm-yy')
            AND D.TEST_NAME =  'Reading Comprehension'
            AND T.TEST_SESSION_STATUS_ID = 3
            AND I.POOL_AVAILABILITY='Y'
            AND P.PRETEST=0 AND C.RESTART_FLAG=0
            AND T.TEST_DETAIL_ID = D.TEST_DETAIL_ID
            AND S.TEST_SESSION_ID = T.TEST_SESSION_ID
            AND C.TEST_SESSION_DETAIL_ID = T.TEST_SESSION_DETAIL_ID
            AND S.INSTITUTION_ID=E.INSTITUTION_ID
            AND SUBSTR(E.INSTITUTION_ID_DISPLAY,8,3) <> '000'
            AND I.ITEM_ID = C.ITEM_ID
            AND P.ITEM_ID = I.ITEM_ID;expln plan
    Plan hash value: 3712814491                                                                                                      
    | Id  | Operation                                 | Name                        | Rows  | Bytes | Cost (%CPU)| Time     | Pstart|
    Pstop |                                                                                                                          
    |   0 | SELECT STATEMENT                          |                             | 50857 |  7151K| 93382   (1)| 00:18:41 |       |
          |                                                                                                                          
    |*  1 |  FILTER                                   |                             |       |       |            |          |       |
          |                                                                                                                          
    |*  2 |   HASH JOIN                               |                             | 50857 |  7151K| 93382   (1)| 00:18:41 |       |
          |                                                                                                                          
    |   3 |    PARTITION HASH ALL                     |                             |  2312 | 23120 |    25   (0)| 00:00:01 |     1 |
        5 |                                                                                                                          
    |*  4 |     TABLE ACCESS FULL                     | CAT_ITEM_PARAMETER          |  2312 | 23120 |    25   (0)| 00:00:01 |     1 |
        5 |                                                                                                                          
    |*  5 |    HASH JOIN                              |                             | 94938 |    12M| 93356   (1)| 00:18:41 |       |
          |                                                                                                                          
    |*  6 |     TABLE ACCESS FULL                     | ITEM_POOL_VERSION           |  9036 |   132K|    30   (0)| 00:00:01 |       |
          |                                                                                                                          
    |*  7 |     TABLE ACCESS BY GLOBAL INDEX ROWID    | CAT_ITEM_USER_RESPONSE      |     9 |   279 |    18   (0)| 00:00:01 | ROWID |
    ROWID |                                                                                                                          
    |   8 |      NESTED LOOPS                         |                             | 45349 |  5270K| 93325   (1)| 00:18:40 |       |
          |                                                                                                                          
    |*  9 |       HASH JOIN                           |                             |  4923 |   423K| 11377   (1)| 00:02:17 |       |
          |                                                                                                                          
    |* 10 |        INDEX FAST FULL SCAN               | INSTI_ID_NAME_COUN_DISP_IDX |  8165 |   111K|    18   (0)| 00:00:01 |       |
          |                                                                                                                          
    |* 11 |        HASH JOIN                          |                             |  4923 |   355K| 11359   (1)| 00:02:17 |       |
          |                                                                                                                          
    |* 12 |         TABLE ACCESS BY GLOBAL INDEX ROWID| TEST_SESSION_DETAIL         |  4107 |   148K|  6804   (1)| 00:01:22 | ROWID |
    ROWID |                                                                                                                          
    |  13 |          NESTED LOOPS                     |                             |  4923 |   278K|  6806   (1)| 00:01:22 |       |
          |                                                                                                                          
    |* 14 |           INDEX RANGE SCAN                | TEST_DETAIL_AK_1            |     1 |    21 |     2   (0)| 00:00:01 |       |
          |                                                                                                                          
    |* 15 |           INDEX RANGE SCAN                | TEST_SESSION_DETAIL_FK2_I   | 39737 |       |   102   (0)| 00:00:02 |       |
          |                                                                                                                          
    |  16 |         PARTITION HASH ALL                |                             |  1672K|    25M|  4546   (1)| 00:00:55 |     1 |
        5 |                                                                                                                          
    |  17 |          TABLE ACCESS FULL                | TEST_SESSION                |  1672K|    25M|  4546   (1)| 00:00:55 |     1 |
        5 |                                                                                                                          
    |* 18 |       INDEX RANGE SCAN                    | CAT_ITEM_USER_RESP_IDX1     |    18 |       |     3   (0)| 00:00:01 |       |
          |                                                                                                                          
    Predicate Information (identified by operation id):                                                                              
       1 - filter(TO_DATE('01-11-09','dd-mm-yy')<=TO_DATE('30-11-09','dd-mm-yy'))                                                    
       2 - access("P"."ITEM_ID"="I"."ITEM_ID")                                                                                       
       4 - filter("P"."PRETEST"=0)                                                                                                   
       5 - access("I"."ITEM_ID"="C"."ITEM_ID")                                                                                       
       6 - filter("I"."POOL_AVAILABILITY"='Y')                                                                                       
       7 - filter(TO_NUMBER("C"."RESTART_FLAG")=0)                                                                                   
       9 - access("S"."INSTITUTION_ID"="E"."INSTITUTION_ID")                                                                         
      10 - filter(SUBSTR("E"."INSTITUTION_ID_DISPLAY",8,3)<>'000')                                                                   
      11 - access("S"."TEST_SESSION_ID"="T"."TEST_SESSION_ID")                                                                       
      12 - filter(TRUNC(INTERNAL_FUNCTION("T"."TEST_END_DATE"))>=TO_DATE('01-11-09','dd-mm-yy') AND "T"."TEST_SESSION_STATUS_ID"=3   
                  AND TRUNC(INTERNAL_FUNCTION("T"."TEST_END_DATE"))<=TO_DATE('30-11-09','dd-mm-yy'))                                 
      14 - access("D"."TEST_NAME"='Reading Comprehension')                                                                           
      15 - access("T"."TEST_DETAIL_ID"="D"."TEST_DETAIL_ID")                                                                         
      18 - access("C"."TEST_SESSION_DETAIL_ID"="T"."TEST_SESSION_DETAIL_ID")                                                         
    43 rows selected.Edited by: user575115 on Dec 18, 2009 12:31 AM

    When you see something like ...
       7 - filter(TO_NUMBER("C"."RESTART_FLAG")=0)                                                                                    It means that Oracle had to do a conversion for you since you aren't using the proper data type in your query.
    That would mean IF there is an index on that column, it won't be useable...

  • Need Help With a Stored Procedure

    Help With a Stored Procedure
    Hi everyone.
    I am quite new relative to creating stored procedures, so I anticipate that whatever help I could get here would be very much helpful.
    Anyway, here is my case:
    I have a table where I need to update some fields with values coming from other tables. The other tables, let us just name as tblRef1, tblRef2 and tblRef3. For clarity, let us name tblToUpdate as my table to update. tblToUpdate has the following fields.
    PlanID
    EmployeeIndicator
    UpdatedBy
    CreatedBy
    tblRef1, tblRef2 and tblRef3 has the following fields:
    UserName
    EmpIndicator
    UserID
    In my stored procedure, I need to perform the following:
    1. Check each row in the tblToUpdate table. Get the CreatedBy value and compare the same to the UserName and UserID field of tblRef1. If no value exists in tblRef1, I then proceed to check if the value exists in the same fields in tblRef2 and tblRef3.
    2. If the value is found, then I would update the EmployeeIndicator field in tblToUpdate with the value found on either tblRef1, tblRef2 or tblRef3.
    I am having some trouble writing the stored procedure to accomplish this. So far, I have written is the following:
    CREATE OR REPLACE PROCEDURE Proc_Upd IS v_rec NUMBER;
    v_plan_no tblToUpdate.PLANID%TYPE;
    v_ref_ind tblToUpdate.EMPLOYEEINDICATOR%TYPE;
    v_update_user tblToUpdate.UPDATEDBY%TYPE;
    v_created_by tblToUpdate.CREATEDBY%TYPE;
    v_correct_ref_ind tblToUpdate.EMPLOYEEIDICATOR%TYPE;
    CURSOR cur_plan IS SELECT PlanID, EmployeeIndicator, UPPER(UpdatedBy), UPPER(CreatedBy) FROM tblToUpdate;
    BEGIN
    Open cur_plan;
         LOOP
         FETCH cur_plan INTO v_plan_no, v_ref_ind, v_update_user, v_created_by;
              EXIT WHEN cur_plan%NOTFOUND;
              BEGIN
              -- Check if v_created_by has value.
                   IF v_created_by IS NOT NULL THEN
                   -- Get the EmpIndicator from the tblRef1, tblRef2 or tblRef3 based on CreatedBy
                   SELECT UPPER(EmpIndicator)
                        INTO v_correct_ref_ind
                        FROM tblRef1
                        WHERE UPPER(USERNAME) = v_created_by
                        OR UPPER(USERID) = v_created_by;
                        IF v_correct_ref_ind IS NOT NULL THEN
                        -- Update the Reference Indicator Field in the table TRP_BUSPLAN_HDR_T.
                             UPDATE TRP_BUSPLAN_HDR_T SET ref_ind = v_correct_ref_ind WHERE plan_no = v_plan_no;
                        ELSIF
                        -- Check the Other tables here????
                        END IF;
                   ELSIF v_created_by IS NULL THEN
                   -- Get the EmpIndicator based on the UpdatedBy
                        SELECT UPPER(EmpIndicator)
                        INTO v_correct_ref_ind
                        FROM tblRef1
                        WHERE UPPER(USERNAME) = v_update_user
                        OR UPPER(USERID) = v_created_by;
                        IF v_correct_ref_ind IS NOT NULL THEN
                        -- Update the Reference Indicator Field in the table TRP_BUSPLAN_HDR_T.
                             UPDATE TRP_BUSPLAN_HDR_T SET ref_ind = v_correct_ref_ind WHERE plan_no = v_plan_no;
                        ELSIF
                        -- Check the Other tables here????
                        END IF;
                   END IF;
              END;
         END LOOP;
         CLOSE cur_plan;
         COMMIT;
    END
    Please take note that the values in the column tblToUpdate.UpdatedBy or tblToUpdate.CreatedBy could match either the UserName or the UserID of the table tblRef1, tblRef2, or tblRef3.
    Kindly provide more insight. When I try to execute the procedure above, I get a DATA NOT FOUND ERROR.
    Thanks.

    Ah, ok; I got the updates the wrong way round then.
    BluShadow's single update sounds like what you need then.
    I also suggest you read this AskTom link to help you see why you should choose to write DML statements before choosing to write cursor + loops.
    In general, when you're being asked to update / insert / delete rows into a table or several tables, your first reaction should be: "Can I do this in SQL?" If you can, then putting it into a stored procedure is usually just a case of putting the sql statement inside the procedure header/footers - can't really get much more simple than that! *{;-)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • I need help to run this package and i got some error

    create or replace
    PACKAGE BODY SUBS_INS_API_sun
    AS
    PROCEDURE SUBSCRIBER_INS_sun
        (SOURCE_SYS_ID IN VARCHAR2,
        TRACKING_ID IN VARCHAR2,
        ACCOUNT_NO IN VARCHAR2,
        prepaidActDevDetails_tab IN prepaidactdvcdetailsobj_sun,
        ERROR_CODE OUT VARCHAR2)
    IS
    Input_Parameter_Is_Null EXCEPTION;
    pragma exception_init(Input_Parameter_Is_Null,-2000);
    prepaidAccountDetails prepaidActDevDetails_tab:= prepaidActDevDetails_tab(NULL,NULL,NULL,NULL,NULL);
    STATUS VARCHAR2(1):='1';
    cust_no VARCHAR(10);
    m_mac_id VARCHAR2(20);
      subscriber_master_Rec subscriber_master%ROWTYPE                 :=NULL;
      flg NUMBER(1);
    BEGIN
       IF(Source_Sys_Id IS NULL OR Tracking_Id IS NULL OR ACCOUNT_NO IS NULL OR prepaidAccountDetails.LAST=0) THEN
        RAISE Input_Parameter_Is_Null;
      END IF;
      BEGIN
             select cm_cust_no into cust_no from customer_master where cm_cust_id=ACCOUNT_NO and cm_status in('A','P','0');
          EXCEPTION
          WHEN NO_DATA_FOUND THEN
            DBMS_OUTPUT.PUT_LINE('NO DATA FOUND');
                   STATUS:='0';
        END;
      BEGIN
         FOR i IN prepaidAccountDetails.FIRST .. (prepaidAccountDetails.LAST) LOOP
         prepaidAccountDetails1:=prepaidActDevDetails_tab(i);
         prepaidAccountDetails1.Status_of_device:='1';
         IF (prepaidAccountDetails.Account_id is NULL OR prepaidAccountDetails.Mac_Id is NULL or prepaidAccountDetails.LOB_value is NULL) THEN
          RAISE Input_Parameter_Is_Null;
                END IF;
                IF(prepaidAccountDetails.LOB_value = 'VDO') THEN
                 IF(prepaidAccountDetails.Channel_Line_Up is NULL) THEN
                  Error_code :='SI002';
                 DBMS_OUTPUT.PUT_LINE('NO DATA FOUND');
                 STATUS:=0;
                  prepaidAccountDetails.Status_of_device:='0';
                 END IF;
                END IF;
                begin
                   select 1 into flg from subscriber_master where pm_phone_no=prepaidAccountDetails.Mac_Id and pm_status in('P','0','A','B');
                EXCEPTION
                 WHEN NO_DATA_FOUND THEN
                  flg:=0;
                 END;
                 if(flg=1) then
                  DBMS_OUTPUT.PUT_LINE('NO DATA FOUND');
                  STATUS:=0;
                  prepaidAccountDetails.Status_of_device:='0';
                 END IF;
                 begin
                  select md_mac_id into m_mac_id from mac_details where md_mac_id=prepaidAccountDetails.Mac_Id and md_start_date<=sysdate
                  and md_status='A';
                EXCEPTION when OTHERS then
                  Error_code :='SI004';
                 DBMS_OUTPUT.PUT_LINE('NO DATA FOUND');
                  STATUS:=0;
                  prepaidAccountDetails.Status_of_device:='0';
                 end;
              if(STATUS= 1 and prepaidAccountDetails.Status_of_device='1') then
               SELECT PM_SUBS_ACT_NO_SEQ.nextval
               INTO subscriber_master_rec.PM_SUBS_ACT_NO
               FROM dual;
              subscriber_master_Rec.pm_phone_no          :=prepaidAccountDetails.Mac_Id;
            subscriber_master_Rec.pm_open_date         :=sysdate;
              subscriber_master_rec.pm_status            :='P';
              subscriber_master_rec.PM_CUST_LVL_YN:='S';
             subscriber_master_rec.PM_EQUP_CODE:=prepaidAccountDetails.LOB_value;
             subscriber_master_rec.PM_HOME_AREA:='HOM';
             subscriber_master_rec.PM_USG_CODE:='USG';
             subscriber_master_rec.PM_NO_TYPE:='S';
             subscriber_master_rec.PM_TCG_CODE:='DEF';
             subscriber_master_rec.PM_APLN_DATE:=sysdate;
              subscriber_master_rec.PM_USER2:=prepaidAccountDetails.LOB_value;
              subscriber_master_rec.PM_USER3:=prepaidAccountDetails.Channel_Line_Up;
              subscriber_master_rec.pm_cust_no:=cust_no;
              INSERT INTO subscriber_master VALUES subscriber_master_rec;
            END IF;
         END LOOP;
        END;
      END SUBSCRIBER_INS_sun;
    END SUBS_INS_API_sun;
    and
    i got this error
    Package Body PREPAID_TESTNEW.SUBS_INS_API@PREPAID_TESTNEW
    Error(73,4): PL/SQL: Statement ignored
    Error(73,99): PLS-00302: component 'LAST' must be declared
    Error(87,6): PL/SQL: Statement ignored
    Error(87,37): PLS-00302: component 'FIRST' must be declared
    please help to run this package if anyone knows

    now i corrected my package. It working fine. But, how to run this package via procedure. my procedure check below. I give all the details about my package check below.
    ---pkg specification
    create or replace
    PACKAGE SUBS_INS_API_SS
    IS
    PROCEDURE SUBSCRIBER_INS_SS
        (SOURCE_SYS_ID IN VARCHAR2,
        TRACKING_ID   IN VARCHAR2,
        ACCOUNT_NO IN VARCHAR2,
        prepaidActDevDetails_tab IN prepaidActDeviceDetails_tabobj,
        ERROR_CODE OUT VARCHAR2);
    END SUBS_INS_API_SS;
    -----pkg body
    create or replace
    PACKAGE BODY SUBS_INS_API_SS
    AS
       PROCEDURE log_error (ip_code          IN VARCHAR2,
                            ip_message       IN VARCHAR2,
                            ip_description   IN VARCHAR2)
       IS
       BEGIN
          INSERT INTO ERR_LOG (IEL_REF_ID,
                               IEL_DATE,
                               IEL_CODE,
                               IEL_MSG,
                               IEL_DESC)
               VALUES (IVRS_ERR_LOG_SEQ.NEXTVAL,
                       SYSDATE,
                       ip_code,
                       ip_message,
                       ip_description);
       EXCEPTION
          WHEN OTHERS
          THEN
             ROLLBACK;
       END log_error;
       PROCEDURE INSERT_WS_LOG (SOURCE_SYS_ID   IN VARCHAR2,
                                STATUS          IN VARCHAR2,
                                TRACKING_ID     IN VARCHAR2,
                                ACCOUNT_ID      IN VARCHAR2,
                                MAC_ID          IN VARCHAR2)
       IS
          ws_log_rec   WS_LOG%ROWTYPE := NULL;
       BEGIN
          SELECT WS_LOG#REC#ID.NEXTVAL INTO ws_log_rec.rec#id FROM DUAL;
          ws_log_rec.VER#ID := 1;
          ws_log_rec.CRE#TS := SYSDATE;
          ws_log_rec.wl_source := SOURCE_SYS_ID;
          ws_log_rec.wl_status := Status;
          ws_log_rec.wl_tracking_id := tracking_id;
          ws_log_rec.wl_account_id := account_id;
          ws_log_rec.wl_mac_id := mac_id;
          INSERT INTO ws_log
               VALUES ws_log_rec;
       EXCEPTION
          WHEN OTHERS
          THEN
             ROLLBACK;
       END INSERT_WS_LOG;
        PROCEDURE REPLICO_DEV_INFO( Acc_id IN VARCHAR2, Mc_Id IN VARCHAR2,channel IN VARCHAR2,
                                     LOB_VAL IN VARCHAR2, outlet1 IN VARCHAR2, kit_cod IN VARCHAR2,
                                     serial_No IN VARCHAR2, shipperr IN VARCHAR2, estm_recived_date IN date)                                                                
        IS
                  Replico_device_info_det_Rec   Replico_device_info_det%ROWTYPE := NULL;
                  REC_ID  NUMBER;
        BEGIN
                  SELECT REPLICO_DEVICE_INFO_DET#RECID.nextval INTO REC_ID FROM dual; 
                   Replico_device_info_det_Rec.REC#ID := REC_ID;                 
                   Replico_device_info_det_Rec.ACCOUNT_ID := Acc_id;
                   Replico_device_info_det_Rec.MAC_ID := Mc_Id;               
                   Replico_device_info_det_Rec.CHANNEL_LINE_UP := channel;
                   Replico_device_info_det_Rec.LOB_VALUE := LOB_VAL;  
                   Replico_device_info_det_Rec.OUTLET := outlet1;
                   Replico_device_info_det_Rec.KIT_CODE := kit_cod;                
                   Replico_device_info_det_Rec.SERIAL_NUMBER := serial_No;                
                   Replico_device_info_det_Rec.SHIPPER := shipperr;                
                   Replico_device_info_det_Rec.ESTIMATED_RECIVED_DATE := estm_recived_date;
                  INSERT INTO replico_device_info_det
                        VALUES Replico_device_info_det_Rec;
                  EXCEPTION
                          WHEN OTHERS
                          THEN
                              ROLLBACK;
        END REPLICO_DEV_INFO;
       PROCEDURE SUBSCRIBER_INS_SS (
          SOURCE_SYS_ID              IN     VARCHAR2,
          TRACKING_ID                IN     VARCHAR2,
          ACCOUNT_NO                 IN     VARCHAR2,
          prepaidActDevDetails_tab   IN     prepaidActDeviceDetails_tabobj,
          ERROR_CODE                    OUT VARCHAR2)
       IS
          Input_Parameter_Is_Null       EXCEPTION;
          PRAGMA EXCEPTION_INIT (Input_Parameter_Is_Null, -2000);
          prepaidAccountDetails         prepaid_act_dvc_details_obj
                                           := prepaid_act_dvc_details_obj  (NULL,
                                                                              NULL,
                                                                              NULL,
                                                                              NULL,
                                                                              NULL,
                                                                              NULL,
                                                                              NULL,
                                                                              NULL,
                                                                              NULL,
                                                                              NULL);
          STATUS                        VARCHAR2 (1) := '1';
          cust_no                       VARCHAR (10);
          m_mac_id                      VARCHAR2 (20);
          channel_lineup                VARCHAR2 (25);
          LOB_VALUE                     VARCHAR2 (25);
          subscriber_master_Rec         subscriber_master%ROWTYPE := NULL;
        Replico_device_info_det_Rec   Replico_device_info_det%ROWTYPE := NULL;
          flg                           NUMBER (1);
          plan_code                     VARCHAR2(10);
          subs_aact_no                 NUMBER(20);
          m_plan_code1               payment_transaction_history.TH_PLAN_CODE%type;
          m_payment_mode1           payment_transaction_history.TH_PAYMENT_MODE%type;
          pm_phone_no_cur        subscriber_master.pm_phone_no%type;
          pm_status_cur          subscriber_master.pm_status%type;
          pm_user2_cur          subscriber_master.pm_user2%type;
          pm_user9_cur        subscriber_master.pm_user9%type;
          pm_cust_no_cur       subscriber_master.pm_cust_no%type;
          pm_cust_1            subscriber_master.pm_cust_no%type;
          cm_i                 customer_master.cm_status%type;
         CURSOR subs_rec is select pm_cust_no, pm_phone_no, pm_status, pm_user2, pm_user9 from subscriber_master
         where pm_cust_no = cust_no and pm_status= 'S';
       BEGIN
          IF (   Source_Sys_Id IS NULL
              OR Tracking_Id IS NULL
              OR ACCOUNT_NO IS NULL
              OR prepaidActDevDetails_tab.LAST = 0)
          THEN
             RAISE Input_Parameter_Is_Null;
          END IF;
          BEGIN
             SELECT cm_cust_no
               INTO cust_no
               FROM customer_master
              WHERE cm_cust_id = ACCOUNT_NO AND cm_status IN ('A', 'P', '0');
          EXCEPTION
             WHEN NO_DATA_FOUND
             THEN
                ERROR_CODE := 'SI001';
                log_error ('SI001',
                           SQLERRM,
                           'No Customer exist with Active or Pre Actiavted');
                INSERT_WS_LOG (Source_Sys_Id,
                               'F',
                               Tracking_Id,
                               Account_No,
                               prepaidAccountDetails.Mac_Id);
                STATUS := '0';
          END;
          BEGIN
             FOR i IN prepaidActDevDetails_tab.FIRST ..
                      (prepaidActDevDetails_tab.LAST)
             LOOP
                prepaidAccountDetails := prepaidActDevDetails_tab (i);
                prepaidAccountDetails.Status_of_device := '1';
                IF (   prepaidAccountDetails.Account_id IS NULL
                    OR prepaidAccountDetails.Mac_Id IS NULL
                    OR prepaidAccountDetails.LOB_value IS NULL)
                THEN
                   RAISE Input_Parameter_Is_Null;
                END IF;
                IF (prepaidAccountDetails.LOB_value = 'VIDEO')
                THEN
                   /* Commented as channel lineup is not coming from the input request */
                   /*IF(prepaidAccountDetails.Channel_Line_Up is NULL) THEN
                    Error_code :='SI002';
                   log_error ('SI002', SQLERRM, 'Channel line up is mandatory for Video');
                   INSERT_WS_LOG(Source_Sys_Id,'F',Tracking_Id,Account_No,prepaidAccountDetails.Mac_Id);
                   STATUS:=0;
                    prepaidAccountDetails.Status_of_device:='0';
                   END IF;*/
                   SELECT EC_CHANNEL_LINEUP
                     INTO channel_lineup
                     FROM ELIGIBLE_CUSTOMER
                    WHERE EC_CUSTOMER_NO = cust_no;
                END IF;
                BEGIN
                   SELECT 1
                     INTO flg
                     FROM subscriber_master
                    WHERE     pm_phone_no = prepaidAccountDetails.Mac_Id
                          AND pm_status IN ('P', '0', 'A', 'B');
                EXCEPTION
                   WHEN NO_DATA_FOUND
                   THEN
                      flg := 0;
                END;
                IF (flg = 1)
                THEN
                   ERROR_CODE := 'SI003';
                   log_error ('SI003',
                              SQLERRM,
                              'Customer Already Exist with given Mac Id');
                   INSERT_WS_LOG (Source_Sys_Id,
                                  'F',
                                  Tracking_Id,
                                  Account_No,
                                  prepaidAccountDetails.Mac_Id);
                   STATUS := 0;
                   prepaidAccountDetails.Status_of_device := '0';
                END IF;
                BEGIN
                   SELECT md_mac_id
                     INTO m_mac_id
                     FROM mac_details
                    WHERE     md_mac_id = prepaidAccountDetails.Mac_Id
                          AND md_start_date <= SYSDATE
                          AND md_status = 'A';
                EXCEPTION
                   WHEN OTHERS
                   THEN
                      ERROR_CODE := 'SI004';
                      log_error ('SI004', SQLERRM, 'Invalid Mac Id');
                      INSERT_WS_LOG (Source_Sys_Id,
                                     'F',
                                     Tracking_Id,
                                     Account_No,
                                     prepaidAccountDetails.Mac_Id);
                      STATUS := 0;
                      prepaidAccountDetails.Status_of_device := '0';
                END;
                 select pm_cust_no into pm_cust_1 from subscriber_master where pm_cust_no = cust_no;
                IF (STATUS = 1 AND prepaidAccountDetails.Status_of_device = '1')
                THEN
                     SELECT DECODE (prepaidAccountDetails.LOB_value,
                                  'HSD', 'HSD',
                                  'VIDEO', 'VDO')
                     INTO LOB_VALUE
                     FROM DUAL;
            OPEN subs_rec;
            LOOP
            FETCH subs_rec into pm_cust_no_cur, pm_phone_no_cur, pm_status_cur, pm_user2_cur, pm_user9_cur;
              IF subs_rec%FOUND THEN
                 IF
                  ( pm_cust_1 = pm_cust_no_cur and pm_user2_cur= LOB_VALUE and pm_user9_cur = prepaidAccountDetails.outlet and pm_status_cur = 'S')
                    THEN
                        update subscriber_master set pm_phone_no = prepaidAccountDetails.Mac_Id, pm_status = 'P', pm_name = prepaidAccountDetails.Mac_Id
                        where pm_cust_no = pm_cust_no_cur and pm_user9 = prepaidAccountDetails.outlet;
                         select cm_status into cm_i from customer_master where cm_cust_no = pm_cust_no_cur;
                            IF( cm_i = '0')
                            THEN
                                update customer_master set cm_status = 'P' where cm_cust_no = pm_cust_no_cur;
                             END IF;
                             REPLICO_DEV_INFO( prepaidAccountDetails.Account_id, prepaidAccountDetails.Mac_Id,channel_lineup,
                                               prepaidAccountDetails.LOB_value, prepaidAccountDetails.outlet, prepaidAccountDetails.kit_code,
                                               prepaidAccountDetails.serial_Number, prepaidAccountDetails.shipper,prepaidAccountDetails.estimated_recived_date);
                    ELSIF
                        ( pm_cust_1 = pm_cust_no_cur and pm_user2_cur= LOB_VALUE and pm_user9_cur = null and pm_status_cur = 'S')
                          THEN
                             update subscriber_master set pm_phone_no = prepaidAccountDetails.Mac_Id, pm_status = 'P', pm_name = prepaidAccountDetails.Mac_Id, pm_user9 = prepaidAccountDetails.outlet
                             where pm_cust_no = pm_cust_no_cur and pm_user9 = NULL;
                             update customer_master set cm_status = 'P' where cm_cust_no = pm_cust_no_cur;
                             REPLICO_DEV_INFO( prepaidAccountDetails.Account_id, prepaidAccountDetails.Mac_Id,channel_lineup,
                                               prepaidAccountDetails.LOB_value, prepaidAccountDetails.outlet, prepaidAccountDetails.kit_code,
                                               prepaidAccountDetails.serial_Number, prepaidAccountDetails.shipper,prepaidAccountDetails.estimated_recived_date);
                    END IF;
                 ELSIF subs_rec%NOTFOUND THEN
                       SELECT PM_SUBS_ACT_NO_SEQ.NEXTVAL
                       INTO subs_aact_no
                       FROM DUAL;
                       subscriber_master_rec.PM_SUBS_ACT_NO := subs_aact_no;
                       subscriber_master_Rec.pm_phone_no :=
                        prepaidAccountDetails.Mac_Id;
                       subscriber_master_Rec.pm_open_date := SYSDATE;
                       subscriber_master_rec.pm_status := 'P';
                       subscriber_master_rec.PM_CUST_LVL_YN := 'S';
                       subscriber_master_rec.PM_EQUP_CODE := LOB_VALUE;
                       subscriber_master_rec.PM_HOME_AREA := 'HOM';
                       subscriber_master_rec.PM_USG_CODE := 'USG';
                       subscriber_master_rec.PM_NO_TYPE := 'S';
                       subscriber_master_rec.PM_TCG_CODE := 'DEF';
                       subscriber_master_rec.PM_APLN_DATE := SYSDATE;
                       subscriber_master_Rec.PM_NAME := prepaidAccountDetails.Mac_Id;
                       subscriber_master_Rec.PM_STAFF_id := '16';
                       subscriber_master_rec.PM_USER2 := LOB_VALUE;
                       subscriber_master_rec.PM_USER3 := channel_lineup;
                       subscriber_master_rec.pm_cust_no := cust_no;
                       subscriber_master_rec.PM_USER8 := 'Y';
                       INSERT INTO subscriber_master
                       VALUES subscriber_master_rec;
                       REPLICO_DEV_INFO( prepaidAccountDetails.Account_id, prepaidAccountDetails.Mac_Id,channel_lineup,
                                         prepaidAccountDetails.LOB_value, prepaidAccountDetails.outlet, prepaidAccountDetails.kit_code,
                                         prepaidAccountDetails.serial_Number, prepaidAccountDetails.shipper,prepaidAccountDetails.estimated_recived_date);
             END IF;
             END LOOP;
             CLOSE subs_rec;
                  SELECT TH_PLAN_CODE,TH_PAYMENT_MODE
                   INTO m_plan_code1,m_payment_mode1
                   FROM PAYMENT_TRANSACTION_HISTORY
                   WHERE TH_CUSTOMER_NO = cust_no
                   AND TH_LOB = LOB_VALUE
                   AND TH_SUBSCRIBER_NO IS NULL;
                   IF(LOB_VALUE = 'HSD') THEN
                    IF(m_plan_code1 = 'SIKI') THEN
                          plan_code := 'SIKI';
                                             ELSE
                      plan_code := 'KIT';
                    END IF;
                   ELSE
                    IF(m_plan_code1 = 'SIKT') THEN
                             plan_code := 'SIKT';
                    ELSE
                          plan_code := 'TV';
                    END IF;
                   END IF;               
                          UPDATE PAYMENT_TRANSACTION_HISTORY SET TH_SUBSCRIBER_NO = subs_aact_no, th_writeback_status = 'Y' WHERE TH_CUSTOMER_NO = cust_no AND TH_PLAN_CODE = plan_code;
                          COMMIT;
                END IF;
             END LOOP;
          END;
       END SUBSCRIBER_INS_SS;
    END SUBS_INS_API_SS;
    --- type object
    create or replace
    TYPE   prepaid_act_dvc_details_obj--prepaidAccountDeviceDetailsObj
    AS     OBJECT ( Account_id VARCHAR2 ( 25 )
           , Mac_Id VARCHAR2 ( 25 )
           , Channel_Line_Up VARCHAR2 ( 25 )
           , LOB_value VARCHAR2 ( 25 )
           , Status_of_device VARCHAR2 ( 25 )
            , outlet VARCHAR2(25)
            , kit_code VARCHAR2(25)
            , serial_Number VARCHAR2(25)
            , shipper VARCHAR2(25)
            , estimated_recived_date date )
    type---
    create or replace
    TYPE prepaidActDeviceDetails_tabobj as table of prepaid_act_dvc_details_obj
    ---- i need to run this package via separate procedure. but i don't know how to pass the variable. because the passing argument contain object tab variable. please help me.. give me suggestion or procedure to run this pkg.

  • I have updated my Macbook Pro from 10.7.5 to 10.9.1 and it keeps on restarting after upgrade. Please help me fix this issue.

    Hi All,
    I have updated the Macbook Pro from 10.7.5 to 10.9.1 today and once it is done I restarted the system and it keeps on crashing/restarting the system every 2 min.
    I have found the below backtrace. Please help me fix this issue.
    Anonymous UUID:  
    C72C8841-51A0-BB21-689C-2AB204820087
    Mon Dec 30 23:57:23 2013
    panic(cpu 0 caller 0xffffff801da5260f): "a freed zone element has been modified: expected 0xdeadbeefdeadbeef but found 0, bits changed 0xdeadbeefdeadbeef, at offset 8 of 128 in zone: kalloc.128"@/SourceCache/xnu/xnu-2422.1.72/osfmk/kern/zalloc.c:461
    Backtrace (CPU 0), Frame : Return Address
    0xffffff8096bf3690 : 0xffffff801da22f69
    0xffffff8096bf3710 : 0xffffff801da5260f
    0xffffff8096bf3770 : 0xffffff801da51d09
    0xffffff8096bf3870 : 0xffffff801da2aa2f
    0xffffff8096bf38a0 : 0xffffff801dde080d
    0xffffff8096bf38e0 : 0xffffff7f9fcada11
    0xffffff8096bf3930 : 0xffffff7f9fcae16e
    0xffffff8096bf39a0 : 0xffffff7f9fcae523
    0xffffff8096bf39d0 : 0xffffff801dc13438
    0xffffff8096bf3a00 : 0xffffff801dd83378
    0xffffff8096bf3a70 : 0xffffff801dbfd1ae
    0xffffff8096bf3ae0 : 0xffffff801dbf437a
    0xffffff8096bf3b80 : 0xffffff801dbe5f15
    0xffffff8096bf3c30 : 0xffffff801dbe67d2
    0xffffff8096bf3f50 : 0xffffff801de3de23
    0xffffff8096bf3fb0 : 0xffffff801daf3e06
    Kernel Extensions in backtrace:
    com.apple.AppleFSCompression.AppleFSCompressionTypeZlib(1.0d1)[E163B7AE-F6E5-328 6-B827-66DB3FE3DB7B]@0xffffff7f9fcac000->0xffffff7f9fcaffff
    BSD process name corresponding to current thread: applet
    Mac OS version:
    13B42
    Kernel version:
    Darwin Kernel Version 13.0.0: Thu Sep 19 22:22:27 PDT 2013; root:xnu-2422.1.72~6/RELEASE_X86_64
    Kernel UUID: 1D9369E3-D0A5-31B6-8D16-BFFBBB390393
    Kernel slide:
    0x000000001d800000
    Kernel text base: 0xffffff801da00000
    System model name: MacBookPro7,1 (Mac-F222BEC8)
    System uptime in nanoseconds: 172506613860
    last loaded kext at 107245362778: com.trendmicro.kext.KERedirect 1.0.0 (addr 0xffffff7f9ff33000, size 24576)
    loaded kexts:
    com.trendmicro.kext.KERedirect 1.0.0
    com.logmein.driver.LogMeInSoundDriver 1.0.0
    org.virtualbox.kext.VBoxUSB 3.2.6
    org.virtualbox.kext.VBoxDrv 3.2.6
    com.apple.driver.AppleHWSensor 1.9.5d0
    com.apple.driver.AppleHDAHardwareConfigDriver 2.5.3fc1
    com.apple.driver.AudioAUUC 1.60
    com.apple.driver.AGPM 100.14.11
    com.apple.driver.AppleTyMCEDriver 1.0.2d2
    com.apple.driver.AppleMikeyHIDDriver 124
    com.apple.driver.AppleHDA 2.5.3fc1
    com.apple.iokit.IOBluetoothSerialManager 4.2.0f6
    com.apple.filesystems.autofs 3.0
    com.apple.GeForceTesla 8.1.8
    com.apple.driver.AppleSMCLMU 2.0.4d1
    com.apple.iokit.IOUserEthernet 1.0.0d1
    com.apple.Dont_Steal_Mac_OS_X 7.0.0
    com.apple.driver.AppleHWAccess 1
    com.apple.driver.AppleMikeyDriver 2.5.3fc1
    com.apple.driver.ACPI_SMC_PlatformPlugin 1.0.0
    com.apple.driver.AppleMuxControl 3.4.12
    com.apple.driver.AppleBacklight 170.3.5
    com.apple.driver.AppleLPC 1.7.0
    com.apple.driver.AppleUpstreamUserClient 3.5.13
    com.apple.nvidia.NVDAStartup 8.1.8
    com.apple.driver.SMCMotionSensor 3.0.4d1
    com.apple.iokit.IOBluetoothUSBDFU 4.2.0f6
    com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport 4.2.0f6
    com.apple.driver.AppleMCCSControl 1.1.12
    com.apple.driver.AppleUSBTCButtons 240.2
    com.apple.driver.AppleIRController 325.7
    com.apple.driver.AppleUSBTCKeyEventDriver 240.2
    com.apple.driver.AppleUSBTCKeyboard 240.2
    com.apple.driver.AppleUSBCardReader 3.3.5
    com.apple.driver.AppleFileSystemDriver 3.0.1
    com.apple.AppleFSCompression.AppleFSCompressionTypeDataless 1.0.0d1
    com.apple.AppleFSCompression.AppleFSCompressionTypeZlib 1.0.0d1
    com.apple.BootCache 35
    com.apple.iokit.SCSITaskUserClient 3.6.0
    com.apple.driver.XsanFilter 404
    com.apple.iokit.IOAHCIBlockStorage 2.4.0
    com.apple.iokit.AppleBCM5701Ethernet 3.6.9b9
    com.apple.driver.AirPort.Brcm4331 700.20.22
    com.apple.driver.AppleAHCIPort 2.9.5
    com.apple.driver.AppleFWOHCI 4.9.9
    com.apple.driver.AppleUSBHub 650.4.4
    com.apple.driver.AppleUSBEHCI 650.4.1
    com.apple.driver.AppleUSBOHCI 650.4.1
    com.apple.driver.AppleSmartBatteryManager 161.0.0
    com.apple.driver.AppleRTC 2.0
    com.apple.driver.AppleHPET 1.8
    com.apple.driver.AppleACPIButtons 2.0
    com.apple.driver.AppleSMBIOS 2.0
    com.apple.driver.AppleACPIEC 2.0
    com.apple.driver.AppleAPIC 1.7
    com.apple.driver.AppleIntelCPUPowerManagementClient 216.0.0
    com.apple.nke.applicationfirewall 153
    com.apple.security.quarantine 3
    com.apple.driver.AppleIntelCPUPowerManagement 216.0.0
    com.apple.AppleGraphicsDeviceControl 3.4.12
    com.apple.driver.DspFuncLib 2.5.3fc1
    com.apple.vecLib.kext 1.0.0
    com.apple.iokit.IOSerialFamily 10.0.7
    com.apple.kext.triggers 1.0
    com.apple.nvidia.classic.NVDANV50HalTesla 8.1.8
    com.apple.iokit.IOAudioFamily 1.9.4fc11
    com.apple.kext.OSvKernDSPLib 1.14
    com.apple.iokit.IOSurface 91
    com.apple.iokit.IOBluetoothFamily 4.2.0f6
    com.apple.driver.IOPlatformPluginLegacy 1.0.0
    com.apple.driver.AppleGraphicsControl 3.4.12
    com.apple.driver.AppleBacklightExpert 1.0.4
    com.apple.driver.IOPlatformPluginFamily 5.5.1d27
    com.apple.nvidia.classic.NVDAResmanTesla 8.1.8
    com.apple.iokit.IONDRVSupport 2.3.6
    com.apple.driver.AppleSMC 3.1.6d1
    com.apple.iokit.IOBluetoothHostControllerUSBTransport 4.2.0f6
    com.apple.iokit.IOFireWireIP 2.2.5
    com.apple.driver.AppleHDAController 2.5.3fc1
    com.apple.iokit.IOHDAFamily 2.5.3fc1
    com.apple.driver.AppleSMBusPCI 1.0.12d1
    com.apple.driver.AppleSMBusController 1.0.11d1
    com.apple.iokit.IOGraphicsFamily 2.3.6
    com.apple.driver.AppleUSBMultitouch 240.6
    com.apple.iokit.IOUSBHIDDriver 650.4.4
    com.apple.iokit.IOSCSIBlockCommandsDevice 3.6.0
    com.apple.iokit.IOUSBMassStorageClass 3.6.0
    com.apple.driver.AppleUSBMergeNub 650.4.0
    com.apple.driver.AppleUSBComposite 650.4.0
    com.apple.iokit.IOSCSIMultimediaCommandsDevice 3.6.0
    com.apple.iokit.IOBDStorageFamily 1.7
    com.apple.iokit.IODVDStorageFamily 1.7.1
    com.apple.iokit.IOCDStorageFamily 1.7.1
    com.apple.iokit.IOAHCISerialATAPI 2.6.0
    com.apple.iokit.IOSCSIArchitectureModelFamily 3.6.0
    com.apple.iokit.IOEthernetAVBController 1.0.3b3
    com.apple.driver.mDNSOffloadUserClient 1.0.1b4
    com.apple.iokit.IO80211Family 600.34
    com.apple.iokit.IONetworkingFamily 3.2
    com.apple.iokit.IOAHCIFamily 2.6.0
    com.apple.iokit.IOFireWireFamily 4.5.5
    com.apple.driver.AppleMCP89RootPortPM 1.11
    com.apple.iokit.IOUSBUserClient 650.4.4
    com.apple.driver.AppleEFINVRAM 2.0
    com.apple.driver.AppleEFIRuntime 2.0
    com.apple.iokit.IOUSBFamily 650.4.4
    com.apple.driver.NVSMU 2.2.9
    com.apple.iokit.IOHIDFamily 2.0.0
    com.apple.iokit.IOSMBusFamily 1.1
    com.apple.security.sandbox 278.10
    com.apple.kext.AppleMatch 1.0.0d1
    com.apple.security.TMSafetyNet 7
    com.apple.driver.AppleKeyStore 2
    com.apple.driver.DiskImages 371.1
    com.apple.iokit.IOStorageFamily 1.9
    com.apple.iokit.IOReportFamily 21
    com.apple.driver.AppleFDEKeyStore 28.30
    com.apple.driver.AppleACPIPlatform 2.0
    com.apple.iokit.IOPCIFamily 2.8
    com.apple.iokit.IOACPIFamily 1.4
    com.apple.kec.corecrypto 1.0
    com.apple.kec.pthread 1
    Unable to gather system configuration information.Model: MacBookPro7,1, BootROM MBP71.0039.B0E, 2 processors, Intel Core 2 Duo, 2.4 GHz, 4 GB, SMC 1.62f7
    Graphics: NVIDIA GeForce 320M, NVIDIA GeForce 320M, PCI, 256 MB
    Memory Module: BANK 0/DIMM0, 2 GB, DDR3, 1067 MHz, 0x80CE, 0x4D34373142353637334648302D4346382020
    Memory Module: BANK 1/DIMM0, 2 GB, DDR3, 1067 MHz, 0x80CE, 0x4D34373142353637334648302D4346382020
    AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x8D), Broadcom BCM43xx 1.0 (5.106.98.100.22)
    Bluetooth: Version 4.2.0f6 12982, 3 services, 15 devices, 0 incoming serial ports
    Network Service: Wi-Fi, AirPort, en1
    Serial ATA Device: TOSHIBA MK2555GSXF, 250.06 GB
    Serial ATA Device: HL-DT-ST DVDRW  GS23N
    USB Device: Built-in iSight
    USB Device: Internal Memory Card Reader
    USB Device: BRCM2046 Hub
    USB Device: Bluetooth USB Host Controller
    USB Device: IR Receiver
    USB Device: Apple Internal Keyboard / Trackpad
    Thunderbolt Bus:
    Please help me fix this issue.
    Thank you,
    Nishanth

    Please read this whole message before doing anything.
    This procedure is a diagnostic test. It’s unlikely to solve your problem. Don’t be disappointed when you find that nothing has changed after you complete it.
    The purpose of the test is to determine whether the problem is caused by third-party software that loads automatically at startup or login, by a peripheral device, by a font conflict, or by corruption of the file system or of certain system caches.
    Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards, if applicable. Start up in safe mode and log in to the account with the problem. You must hold down the shift key twice: once when you boot, and again when you log in.
    Note: If FileVault is enabled, or if a firmware password is set, or if the boot volume is a software RAID, you can’t do this. Ask for further instructions.
    Safe mode is much slower to boot and run than normal, with limited graphics performance, and some things won’t work at all, including sound output and Wi-Fi on certain models. The next normal boot may also be somewhat slow.
    The login screen appears even if you usually login automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.
    Test while in safe mode. Same problem?
    After testing, reboot as usual (i.e., not in safe mode) and verify that you still have the problem. Post the results of the test.

  • Can anyone help me with this problem?

    Okay, here's the deal. My girlfriend's Toshiba laptop fell off her nightstand, and took a 2.5 foot fall to her hard wooden floor. It landed on the right side, which as you all probably know has both the hard drive and DVD drive. Setting aside the fact that it happened, let me explain the dilemma.
    It powers up, but won't boot windows 7. I immedately think the hard drive is f*cked, but I'm not sure. It shows the Toshiba screen for a couple seconds, where you can enter BIOS. After that, it goes to a black screen with a blinking underscore at the top left hand corner. It then stays that way indefinitely, with the underscore eventually going away to where it's nothing but a black screen (but lit up, not black like when it's turned off).
    I am convinced it won't pass POST. However, I'm not sure if it's the hard drive or the DVD drive. Here's why: 
    When I enter BIOS, I tried switching the primary drive check in the Boot tab, to where it checks the DVD drive first. Then when I restarted it, it would give me a message saying "drive failed to boot (dvd drive name here, can't remember off the top of my head)'". Does this mean the DVD drive is now defective, or does it fail to boot because of a lack of connection from the hard drive, which might be defective? If I keep the hard drive set as the primary drive being checked during bootup, I don't get that message.  When I see her again, I will see if I can swap out her hard drive with the one from my laptop, assuming they have the same sockets. 
    I'm wondering, can a defective DVD drive keep a computer from loading the OS, or is it just the hard drive? I'm an amateur when it comes to computers, so these are the questions I don't know the answer to. One other thing to mention, is I disabled the DVD drive in BIOS, and it still wouldn't load windows 7. That's why I'm leaning towards a defective hard drive. 
    But, I'm not certain. I'm at a loss as to which it could be, or if it's even one of the two drives. Any help or other recommended procedures to do an at-home diagnostics check would be greatly appreciated. The model is a Satellite a665. 
    Thanks in advance, I really do appreciate any input!

    Reasons for Drive Failure
    Hard drives are mechanical devices with moving parts, so they are subject to expected wear and tear, and can potentially fail mechanically at any given time. But most manufacturers will label their product with an expected average lifespan (usually provided in total expected number of functioning hours). But if a part is faulty or there are some manufacturing defects, a drive's lifespan can be over in as little as a day. Other factors are primarily external in nature. Power surges can cause drive failure, as can fire or water damage, along with a number of computer viruses. Exposure to high levels of magnetism can disrupt the normal functions of a drive, along with sharp impacts. If dust gets into a drive, it can become the catalyst for an eventual failure.
    You could try to boot with this. It will test your HD!
    I would say your HD is toast!http://www.seagate.com/support/internal-hard-drives/consumer-electronics/ld25-series/seatools-dos-ma...
    Read more: http://www.ehow.com/about_5087073_causes-hard-drive-fail.html#ixzz2aOMvlQ8w
    I Love my Satellite L775D-S7222 Laptop. Some days you're the windshield, Some days you're the bug. The Computer world is crazy. If you have answers to computer problems, pass them forward.

  • Every time I open Firefox another page of Firefox opens that has adds. What can you do to help me fix this issue?

    When I boot up Firefox, my default web browser, Firefox appears and then it loads another page of Firefox that has adds. How can you help me with this issue?

    This unwanted page opens as a second tab, or as a second window? The usual cause of this problem is a bad add-on. Here's my suggested procedure for tracking down and removing bad add-ons. I know it seems long, but it's not that bad.
    (1) Open the Windows '''Control Panel''', Uninstall a Program. After the list loads, click the "Installed on" column heading to group the infections, I mean, additions, by date. This can help in smoking out undisclosed bundle items that snuck in with some software you agreed to install. ''Don't be fooled by seemingly innocent or important names if you do not remember choosing to install them.'' Take out as much trash as possible here.
    (2) Open Firefox's '''Add-ons page''' using either:
    * Ctrl+Shift+a
    * "3-bar" menu button (or Tools menu) > Add-ons
    * in the Windows "Run" dialog, type or paste <br><code>firefox.exe "about:addons"</code>
    In the left column, click '''Plugins'''. Set nonessential and unrecognized plugins to "Never Activate".
    In the left column, click '''Extensions'''. Then, if in doubt, disable (or Remove, if possible) unrecognized and unwanted extensions. (Note: you might not be able to manually Disable extensions in Safe Mode because they are disabled automatically.)
    Often a link will appear above at least one disabled extension to restart Firefox. You can complete your work on the tab and click one of the links as the last step.
    Any improvement?
    (3) You can search for remaining issues with the '''scanning/cleaning tools''' listed in our support article: [[Troubleshoot Firefox issues caused by malware]]. These on-demand scanners are free and take considerable time to run. If they finish quickly and especially if they require payment, you may have a serious infection. I suggest the specialized forums listed in the article in that case.
    Success?

  • How to use bind variables in this procedure

    Hi Experts,
    How to use bind variables in this procedure for static queries.
    PROCEDURE DELETE_MER_PROC (M_id IN NUMBER)
    IS
    BEGIN
    V_date DATE;
    SELECT PD_DATE INTO v_date FROM PD_MAINTAIN;
        DELETE FROM MER_CLEAR
        WHERE MER_DT < v_date
        AND ID = M_ID;
    COMMIT;
    END;   
    How to use  v_date and m_id as bind variables in this procedure to avoid hard parsing.
    Please help me.
    Thanks.

    976208 wrote:
    How to use  v_date and m_id as bind variables in this procedure to avoid hard parsing.
    You cannot avoid hard parsing - as the 1st time a SQL statement (like the SELECT or DELETE statements in your code) is encountered, it does not reside in the server's Shared Pool, and needs to be added into the pool via a hard parse.
    Bind variables does not prevent hard parsing. Hard parsing happens when the SQL statement (with or without bind variables) is a brand new statement encountered by the server.
    Bind variables enables the same SQL cursor to be reused, by simply changing the bind variable value.
    Not using bind variables means that each SQL statement is unique and not shareable - as the value is hardcoded into the statement and cannot be changed via a bind value. This typically means LOTS of different SQL statements (where the only difference is the changed value in the statement) are created - with each statement being a new statement not seen before in the Shared Pool and needing to be hard parsed.
    One does not design one's code not to be hard parsed. There ALWAYS will be a hard parse in order to get a SQL statement into the Shared Pool. One designs one's code to REUSE cursors in the Shared Pool.

  • Help to Simplify this query

    i am using
    Oracle8i Enterprise Edition Release 8.1.7.4.0 - Production
    With the Partitioning option
    JServer Release 8.1.7.4.0 - Production
    Please help to simplify this query. I also want to make this as a procedure.
    select
    RH.resort as RH_RESORT,
    RH.rate_code as RH_RATE_CODE,
    RD.rate_detail_id as RD_RATE_DETAIL_ID,
    RD.rate1 as RD_RATE1,
    RD.rate2 as RD_RATE2,
    RD.rate3 as RD_RATE3,
    RD.rate4 as RD_RATE4,
    RD.rate5 as RD_RATE5,
    RRC.room_category as RM_CAT,
    initcap(RRMCAT.long_description) as RM_DESC,
    RH.DAY1,
    RH.DAY2,
    RH.DAY3,
    RH.DAY4,
    RH.DAY5,
    RH.DAY6,
    RH.DAY7,
    RH.WEEKEND1,
    RH.WEEKEND2,
    RH.WEEKEND3,
    RH.WEEKEND4,
    RH.WEEKEND5,
    RH.WEEKEND6,
    RH.WEEKEND7
    from pms_rate_header RH,
    pms_rate_detail RD,
    pms_rate_room_cat RRC,
    resort_room_category RRMCAT
    where RH.inactive_date is NULL
    and RH.RESORT='FABGOI'
    and RH.RATE_CODE ='CRRRACK'
    and ('15-Jan-2007' >= RH.BEGIN_DATE
    and '16-Jan-2007' <= RH.END_DATE)
    and RD.rate_header_id=RH.rate_header_id
    and RD.inactive_date is NULL
    and ('15-Jan-2007' >= RD.BEGIN_DATE
    and '16-Jan-2007' <= RD.END_DATE)
    and RRC.rate_detail_id=RD.rate_detail_id
    and RRC.resort=RH.resort
    and RRMCAT.resort=RH.resort
    and RRMCAT.room_category=RRC.room_category
    and RRC.inactive_date is NULL
    and RRMCAT.inactive_date IS NULL
    regards
    lee1212

    where RH.inactive_date is NULL
    and RH.RESORT='FABGOI'
    and RH.RATE_CODE ='CRRRACK'
    and ('15-Jan-2007' >= RH.BEGIN_DATE
    and '16-Jan-2007' <= RH.END_DATE)
    and RD.rate_header_id=RH.rate_header_id
    and RD.inactive_date is NULL
    and ('15-Jan-2007' >= RD.BEGIN_DATE
    and '16-Jan-2007' <= RD.END_DATE)
    and RRC.rate_detail_id=RD.rate_detail_id
    and RRC.resort=RH.resort
    and RRMCAT.resort=RH.resort
    and RRMCAT.room_category=RRC.room_category
    and RRC.inactive_date is NULL
    and RRMCAT.inactive_date IS NULL
    in the above part i am finding repeated joins and lot of 'and's
    i want to know any line can be eliminated or the the query can be rewritten in a simple way without affecting it's accuracy?
    regards
    Lee1212

  • Please help me test this problem with CSR4 and Flash10.

    I have tested the below problem on 2 desktop and 2 laptop Windows systems with the same result. Would you please test this procedure and report whether you do or do not have the same results.
    I am assuming that the systems you use are the latest with all updates installed.
    1. Start Photoshop and open any image file. Click on the move tool and see that you get the normal tool cursor.
    2. Navigate to http://www.layersmagazine.com/working-with-text-in-flash-part-2.html (uses Flash 10 as the tutorial engine).
    3. The tutorial should start automatically. While it is running switch to Photoshop and verify you still have a move cursor.
    4. Switch to the tutorial and click on the flash icon to watch it in full screen mode. Watch it for a couple of seconds. Press ESC to return to normal size mode.
    5. Switch to Photoshop and look at the cursor. On the 4 systems I have tested this on, the cursor changes to a hand and remains a hand no matter what tool icon is clicked.
    Sometimes closing the tutorial and Photoshop returns everything it normal functioning. I have reported this to customer service. Sometimes I have to reboot to cause it to happen.
    I would like to determine if it just the 4 systems I have tested or if others experience the same problem. Thank you for your help.
    Mike

    That works!  Thank you.
    How did you know to try that and what is happening?
    Mike

  • After a few minutes on safari it freezes everything i can't even force quit i have to shut off by holding the power button down please help me with this. thanks

    everything freezes i can't even force quit i have to shut off by holding the power button down please help me with this. thanks

    Please read this whole message before doing anything.
    This procedure is a diagnostic test. It’s unlikely to solve your problem. Don’t be disappointed when you find that nothing has changed after you complete it.
    The purpose of the test is to determine whether the problem is caused by third-party software that loads automatically at startup or login, by a peripheral device, by a font conflict, or by corruption of the file system or of certain system caches.
    Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards, if applicable. Start up in safe mode and log in to the account with the problem. You must hold down the shift key twice: once when you turn on the computer, and again when you log in.
    Note: If FileVault is enabled, or if a firmware password is set, or if the startup volume is a Fusion Drive or a software RAID, you can’t do this. Ask for further instructions.
    Safe mode is much slower to start up and run than normal, with limited graphics performance, and some things won’t work at all, including sound output and Wi-Fi on certain models. The next normal startup may also be somewhat slow.
    The login screen appears even if you usually login automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.
    Test while in safe mode. Same problem?
    After testing, restart as usual (not in safe mode) and verify that you still have the problem. Post the results of the test.

  • Cannot Remove Backup files - not enough memory to support this procedure

    I Have SL510 and Windows 7 Proffessional. When I go to Thinkvantage R&R and click advanced dropdown box to delete backups there are no backups shown which can be deleted. I can however view backups but there are no buttons to delete. I'm stuck with 120GB of backups out of total capacity of 280Gb
    Help please.
    Moderator edit: Matched subject to content.
    Solved!
    Go to Solution.

    I have now eventually found a way to see the backups and to tick the box to delete selected backups. After running for a while I get a message that the system does not have enough memory to support this procedure.

Maybe you are looking for

  • 32 Bit Oracle Client Libraries on a 64 Bit Machine

    Hello, I own a 32 bit application that is running on a 64 bit linux machine currently only installed with 64 bit oracle client libraries. I requested the administrator install the 32 bit client libraries so that my application can function and they t

  • Reinstalling Photoshop CS6 on a Mac and Bridge does not install

    I've been having trouble with Bridge CS6 not creating previews and thumbnails correctly, so i tried to reinstall the software and during the process it creates the Bridge folder and then when the install is complete the folder goes away. Befroe doing

  • Home music recording- is the Mac Pro better for this than an iMac?

    I know it seems like a daft question but if you were to recommend a Mac for a DECENT home studio and money were (within reason) nearly no object WHAT Mac would you recommend? I always believed that a good sized desktop would be better than an iMac or

  • Enquiry about OSPF Cost

    Hi there, I would like ask for your expertise how to get riding of non-voice traffic passing through the10M MetroEthernet voice link in the following WAN overview: Host End 1 Data VLAN: 173.105.0.0/16 Voice VLAN: 10.105.0.0/16 Voice & Data VLAN > SW1

  • HTTP 404 Not Found Error in Process Control Mail

    Hi All, I am working on version 9.3.3 I have setup e-mail alerts through a SMTP server. When I am going on Process control and starting the cycle OR promoting to any level, I am getting a Minimized window showing HTTP 404 Not Found error and Mail is