|
Mary Anotny
Starting Member
India
1 Posts |
Posted - 09/09/2009 : 02:36:57
|
Hi,
I have declared a CURSOR as follows in my Por*C code.
DECLARE sample_dt_cursor CURSOR FOR SELECT LPAD(TO_CHAR(TO_DATE(sample_dt,'DD-MON-YY'),'MMDDYY'),6,0), sample_id FROM SAMPLE_TABLE WHERE sample_ind= 'N' AND upper(sample_id) = upper(:db_sample_id) AND sample_dt <> TRUNC(SYSDATE);
When I run the select query in the sqlplus prompt, I get the Left padded value of the sample_dt (090809 - MMDDYY). But when I fetch the data from the cursor in the code, I'm not getting the left padded value(90809 - MMDDYY).
Can anyone help me resolve this issue ? I'm new to cursors.
Thanks, Mary Antony |
|