Re: Calling a SP inside a cursor loop..



I have SP, which has a cursor iterations. Need to call another SP for
every loop iteration of the cursor. <<

No. You need to learn to program in SQL. All you are doing is
mimicing a 1960's 3GL magnetic tape file system . In your pseudo
code, you even refer to fields instead of columns! You put the "sp_"
prefix on procedure names!

Don't you understand that SQL is a non-procedurdal language? You
should write only a few cursors in 20 years, not two in one
application.

Your whole approach to the problem is **fundamentally** wrong.

The problem I had been facing is that, the when a stored proc is called within the loop, the proc is getting into infinite loops. <<

It is very hard to de-bug code that you will not show us. But when
pseudo code is this awful, I bet that the real code is a total mess.
More cursors? Dynamic SQL? Badly written procedural code with poor
coupling and cohesion?

Any Help would be appreciated. <<

You have no idea what you are doing. What you will get on Newsgroups
is a quick kludge to get rid of you, but not any real help. You need
to stop programming and get some education; then get some training.

.



Relevant Pages

  • Re: Order By question
    ... Is there a way to do that via sql? ... another way of saying the same thing...via very "pseudo" code ... Dmitriy. ...
    (microsoft.public.vb.database.ado)
  • Re: Order By question
    ... Is there a way to do that via sql? ... another way of saying the same thing...via very "pseudo" code ... From TableName ...
    (microsoft.public.vb.database.ado)
  • Re: Slight "I have some string, how lng it it, BTW, its blue" question
    ... can you expand on what you mean by 'Using cursors to do your join'? ... As I stated before....if you can do it in SQL, choose that approach over PL/SQL. ... So if you have a view call a view, and your write SQL to reference the first view, Oracle will merge all the views into your SQL statement and then execute the entire thing as one large SQL statement. ...
    (comp.databases.oracle.misc)
  • Re: Slight "I have some string, how lng it it, BTW, its blue" question
    ... can you expand on what you mean by 'Using cursors to do your join'? ... Most every time, SQL will beat PL/SQL. ... Oracle will merge views by default. ... over documentation every time. ...
    (comp.databases.oracle.misc)
  • Re: A new proof of the superiority of set oriented approaches: numerical/time serie linear interpola
    ... a performance improvement, I'm sure that makes you feel good but you ... This one added to the hundred others taking out cursors. ... languages like T-SQL or PL/SQL are ... SQL and sets only, ...
    (comp.databases.theory)