Thanks for your suggestions. This is a wonderful group with everybody giving such prompt responses.
Thanks David, the exec enclosing the cursor works.
But I have been toying with the idea of creating a temp table as jxflagg and Gary have suggested. Would a temp table be better as far as performance goes ? Is there anyway I can these cursors into joins so that I can avoid the cursors ? I am a novice at creating joins.
Thanks again.