Hi, i want automatically calculate max length of tables column data.When i type column name manually in max(length(column_name)) function result is correct, But when i give column name with parameter result is wrong.
How must i give column name with parameter to get correct result.
Thans
--query which result is correct
SELECT MAX(LENGTH (INFO)) FROM system.help;
--wrong result
DECLARE
v_col_name varchar2(100):='INFO';
v_result varchar2(100);
begin
SELECT MAX(LENGTH (v_col_name)) into v_result FROM system.help;
dbms_output.put_line(v_result);
end;