Advertisement

10.22.2008 at 11:23PM PDT, ID: 23839696 | Points: 500
[x]
Attachment Details

Help required in Procedure

Asked by kirank05 in Oracle 10.x, Oracle 9.x, PL / SQL

Hi,

  When am doing update in procedure through dynamically.It's getting the error.Can you please check whether it is correct or anything do it in a better way.

Procedure P1(u IN users%ROWTYPE,
                         r IN c1%ROWTYPE)
IS
BEGIN
sql_stmt := 'UPDATE users
    SET
       -------------------------------------------------------------
        , email                        = NVL(r.email,u.email)
        , firstname                 = NVL(r.firstname , u.firstname  )
        , lastname                  = NVL(r.lastname  , u.lastname   )
        ,'||AttribNameVar ||'         = 'Root'
       
    WHERE id = u.id';
 EXECUTE IMMEDIATE sql_stmt;
END p1;

===============
Here AttribNameVar will come as columnName dynamically with another procedure.
suppose AttribNameVar = 'BH_INTEREST'(columnname in users table)
                                         'CRD_INTEREST'
                                         'CRD2_INTEREST'
                                         and so on...

Can anybody help me why am getting error when i written this in dynamically.

Thanks in advance

Start Free Trial
 
 
Loading Advertisement...
 
[+][-]10.22.2008 at 11:28PM PDT, ID: 22783548

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.22.2008 at 11:31PM PDT, ID: 22783555

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.22.2008 at 11:48PM PDT, ID: 22783618

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.22.2008 at 11:49PM PDT, ID: 22783623

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.23.2008 at 12:14AM PDT, ID: 22783709

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.23.2008 at 12:43AM PDT, ID: 22783838

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 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.23.2008 at 12:54AM PDT, ID: 22783883

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.23.2008 at 01:21AM PDT, ID: 22784017

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 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.23.2008 at 01:27AM PDT, ID: 22784039

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.23.2008 at 01:41AM PDT, ID: 22784111

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 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.23.2008 at 02:32AM PDT, ID: 22784345

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.23.2008 at 08:33AM PDT, ID: 22787278

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 - Hierarchy / EE_QW_2_20070628