Hey Jennifer
I read it before you edited it
Could it be because your trying to print the 1st thing in the resultset before you've moved the pointer with next() ?
That's the first thing that comes to mind. If the query executes ok and you get a result in the analyser then there is nothing wrong with the query itself. If using next() doesn't work then I guess the next question would be if you've made any changes to the type of cursor you use or an other changes not shown in your code.
Let me know if that works...