tags:

views:

170

answers:

2

Hi,

I have a stored procedure that takes in two dates and passes back a cursor. The stored procedure compiles however I am having trouble writing the correct pl/sql to 'see' what is returned. I have tried the following:

DBMS_OUTPUT.PUT_LINE('MY_CURSOR=' || MY_CURSOR)

declaring local variables that represent the columns contained in a row of the cursor then I

loop fetch MY_CURSOR into the local variables exit when MY_CURSOR%notfound DBMS_OUTPUT_PUTLINE(local variable 1 || local variable 2 etc..) end loop close MY_CURSOR

The loop seems to execute further however I get an error on my fetchline: ORA-01858: a non-numeric character was found where a numeric was expected ORA-06512: at line 18

Can anyone provide any advice?

+1  A: 

The loop works for my needs - I had the variables in the wrong order.

Barry
A: 

The loop seems to execute further however I get an error on my fetchline: ORA-01858: a non-numeric character was found where a numeric was expected ORA-06512: at line 18

Check the types of the local variables you are fetching into.

Seems you try to fetch a VARCHAR2 field into a NUMBER variable.

Quassnoi