--------------------------------------------
set serveroutput on
DECLARE
CURSOR cur is select ed_no, length(ed_no) as len from
li******@pubdb.world; BEGIN
for cur_rec in cur
loop
DBMS_OUTPUT.PUT_Line
('>'||cur_rec.ed_no||'<'||to_char(cur_rec.len) );
end loop;
end;
/
-------------------------------------------
this returns
ABC <3
XYZ <3 ....
i.e. result has correct value plus six trailing spaces
Column ed_no is CHAR(3)
I have the same problem with all CHAR columns in all tables. The
column length is tripled and trailing spaces added if I define the
cursor through the database link.
However, if I login to that database directly and get rid of
"@pubdb.world" in cursor definition, everything works fine and the
code returns
ABC<3
XYZ<3
....
Any comments, suggestions, workarounds, please... This bug (I believe
it's a bug) gonna ruin a month of my work :(((
I NEED the database link and I cannot employ RTRIM() everywhere.
Regards,
Dmitry