Hi Pando,

It looks to me line it returns the sql text of any open
cursors by user 'ICLICK'. you might want to add an 'order by piece' to it. Each 'piece' is about 80 characters of sql text.

Another thing I suggest, if you want to see the format of the sql as it was submitted to Oracle, is instead of V$SQLTEXT, use V$SQLTEXT_WITH_NEWLINES.

I'm not sure what the point of the count(1) is since piece is going to make each line unique anyway.

-John