Question

I'm using TOAD editor to write PL/SQL scripts. I cannot see value of a clob variable while debugging my script. I tried to add watch to_char(my_clob_variable), bu it didnt work.

Is there a way to see the clob value with toad's features or is there an other way around to do that? (Except updating scripts with dbms_output lines)

Was it helpful?

Solution

I struggled with this for a while and implemented the PL/SQL solution, but later realized that in Toad you can simply double click on the results grid cell, and it brings up an editor with contents in text.

enter image description here

OTHER TIPS

DECLARE
    l_lob CLOB;
BEGIN
    DBMS_LOB.CREATETEMPORARY(l_lob, TRUE, DBMS_LOB.SESSION);

    l_lob := 'Oracle is an American multinational computer technology 
              corporation headquartered in Redwood City, California, United States.';

    IF DBMS_LOB.SUBSTR(l_lob, 6, 1) = 'Oracle' THEN
        DBMS_OUTPUT.PUT_LINE('... code here ...');
    END IF;

    DBMS_LOB.FREETEMPORARY(l_lob);
END;
/*
Result:

... code here ...

*/
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top