How to use excute immediate to execute a procedure?

I have a procedure which check whether another procedure is exist, if exists, then use execute immediate to run the procedure.

select count(distinct name) into l_proCount from user_source where type = 'PROCEDURE' and name like '%LC_DELETEMETADATAFORPROCESS%';
      if(l_proCount > 0)then
         execute immediate 'LC_DELETEMETADATAFORPROCESS(2111,1);';
         end if;

But this not works, it complains error in the execute immediate line.

How to solve this? Any suggestions are welcome, thank you.
c_lawAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

gabesoSolution ArchitectCommented:
Try this line instead:
execute immediate 'LC_DELETEMETADATAFORPROCESS(2111,1)';
0
c_lawAuthor Commented:
It's not working as well , but I found the solution from Google, need to wrap the begin end to the procedure when using execute immediate to execute procedure.
0
RCorfmanCommented:
Why isn't it working well?  Google is correct as you have to have a good executable sql statement in execute immediate. A stand-alone procedure is not an executable statement all alone, a block is.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
c_lawAuthor Commented:
cheers :)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Databases

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.