[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.6

execution error

Asked by frinpd in Oracle Database

Tags: must, declared, identifier

I have procedure as below i am trying to run from sql it give me error

SQL>  execute financial_p(9,'2004');
BEGIN financial_p(9,'2004'); END;

      *
ERROR at line 1:
ORA-06550: line 1, column 7:
PLS-00201: identifier 'FINANCIAL_P' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored


Here is the procedure . which is similar to other one which is running fine.

CREATE OR REPLACE PROCEDURE Finacial_P (p_month number,p_year varchar2) IS
begin
declare

tmpVar NUMBER;

cosf number;
sga  number;
common number;
branch_cd number;

curdate date;
v_end_date date;

--cursor gl is select * from temp_gl_bal;

--gl_bal gl%ROWTYPE;

BEGIN
   --tmpVar := 0;

delete from Q_FUNC_RATIO_B_PARAM_IV;
delete from qa_results where plan_id = 112;
commit;

   --curdate := TO_DATE(p_year || TO_CHAR(p_month,'fm00'),'RRRRMM');
   --v_end_date := LAST_DAY(TO_DATE(p_year || TO_CHAR(p_month,'fm00'),'RRRRMM'));
   curdate := '01' ||'-'|| to_char(p_month,'MON') ||p_year;
   v_end_date := last_day(to_date(curdate,'DD-MON-YYYY'));
   delete from temp_gl_bal;
   Commit;
   if (p_month != 1) then
           insert into temp_gl_bal
           (
           segment1,segment2,period_year,period_num,actual_flag,period_net_dr,period_net_cr
           )
           (
           select segment1,segment2,period_year,period_num,actual_flag,period_net_dr,period_net_cr
           from gl_code_combinations_kfv gcc,gl_balances gl
           where gcc.code_combination_id =  gl.code_combination_id
           and set_of_books_id = 2
           and actual_flag= 'A'
           and period_year = p_year
           and period_num = p_month
           and substr(segment1,1,1) in ('5','6','7')
           );


           insert into temp_gl_bal
           (
           segment1,segment2,period_year,period_num,actual_flag,period_net_dr,period_net_cr
           )
           (
           select segment1,segment2,period_year,period_num,actual_flag,period_net_dr,period_net_cr
           from gl_code_combinations_kfv gcc,gl_balances gl
           where gcc.code_combination_id =  gl.code_combination_id
           and set_of_books_id = 2
           and actual_flag= 'B'
        and period_year = p_year
           and period_num between 1 and (p_month-1)
           and substr(segment1,1,1) in ('5','6','7')
           );
   else
            insert into temp_gl_bal
            (
            segment1,segment2,period_year,period_num,actual_flag,period_net_dr,period_net_cr
            )
            (
            select segment1,segment2,period_year,period_num,actual_flag,period_net_dr,period_net_cr
            from gl_code_combinations_kfv gcc,gl_balances gl
            where gcc.code_combination_id =  gl.code_combination_id
            and set_of_books_id = 2
            and actual_flag= 'A'
            and period_year = p_year
            and period_num = p_month
            and substr(segment1,1,1) in ('5','6','7')
            );
   end if;

   commit;

   insert into Q_FUNC_RATIO_B_PARAM_IV
   (
   process_status,organization_code,plan_name,
   branch_cd,cosf_ratio,sga_ratio,common_ratio,
   date_opened,date_closed
   )
   (
   select 1,'USA','FUNC RATIO B PARAM',SEGMENT2,cosf_ratio,
         case when (sum_of_csc-nvl(cosf,0))= 0 then '0'
             else substr( (1-cosf_ratio*SGA/(sum_of_csc-nvl(cosf,0))
                                    ),   1,5)
         end as SGA,
             case when (sum_of_csc-nvl(cosf,0))= '0' OR (sum_of_csc - (nvl(cosf,0)+nvl(sga,0)))=0 then '0'
             else substr(abs((1-(cosf_ratio+(1-cosf_ratio*SGA/(sum_of_csc-nvl(cosf,0)))) *
                                    COMMON / (sum_of_csc - (nvl(cosf,0)+nvl(sga,0)))
                                 )),1,5)
         end as COMMON,curdate,v_end_date
                      from (
                         select SEGMENT2, sum(COSF) as cosf, sum(SGA) as sga, sum(COMMON) as common,
                       -- sum of cosf, sga, and common
                       sum(cosf)+sum(sga)+sum(common) as sum_of_csc,
                           case when nvl(sum(cosf),0) = 0 then 0
                                    else
                              trunc(sum(cosf)/(sum(cosf)+sum(sga)+sum(common)),4) end as cosf_ratio
                      from
                                (select SEGMENT1, SEGMENT2,
                                nvl(decode(substr(SEGMENT1,1,1),'5',nvl(PERIOD_NET_DR-PERIOD_NET_CR,0)),0) as cosf,
                                    nvl(decode(substr(SEGMENT1,1,1),'6',nvl(PERIOD_NET_DR-PERIOD_NET_CR,0)),0) as sga,
                                    nvl(decode(substr(SEGMENT1,1,1),'7',nvl(PERIOD_NET_DR-PERIOD_NET_CR,0)),0) as common
                                   from temp_gl_bal
                             )
                        group by segment2
                          )
    );
   EXCEPTION
     WHEN NO_DATA_FOUND THEN
       NULL;
     WHEN OTHERS THEN
       -- Consider logging the error and then re-raise
       RAISE;
END ;
end;
/


Any clue...
[+][-]10/04/04 01:08 PM, ID: 12220803Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/04/04 01:10 PM, ID: 12220838Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/04/04 01:17 PM, ID: 12220898Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/04/04 01:29 PM, ID: 12221034Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/04/04 01:34 PM, ID: 12221097Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zone: Oracle Database
Tags: must, declared, identifier
Sign Up Now!
Solution Provided By: seazodiac
Participating Experts: 1
Solution Grade: B
 
[+][-]10/04/04 01:37 PM, ID: 12221137Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/04/04 01:37 PM, ID: 12221139Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/04/04 01:39 PM, ID: 12221157Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/04/04 01:43 PM, ID: 12221207Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/04/04 01:48 PM, ID: 12221263Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/04/04 01:55 PM, ID: 12221329Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/04/04 03:15 PM, ID: 12221997Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091021-EE-VQP-81