Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Convertvarchar2 to clob

Status
Not open for further replies.

kv444

Programmer
Nov 20, 2011
23
US
Hi,

Could some one please tell me how i can convert VARCH2 to clob datatype in plsql.



Thanks
 
I believe what you want is to simply assign the CLOB from the Varchar2:
Code:
declare
    My_VarChar varchar2(20) := 'Hello KV444';
    My_Clob    CLOB;
begin
    dbms_output.put_line(my_varchar||': This is from the Varchar2.');
    My_Clob := My_varchar||': This shows Varchar2-to-CLOB conversion.';
    dbms_output.put_line(My_Clob);
end;
/
Let us know if this is what you wanted.

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
“People may forget what you say, but they will never forget how you made them feel.
 
Duh...it would be helpful if I posted the results of the above code, huh.:
Code:
Hello KV444: This is from the Varchar2.
Hello KV444: This shows Varchar2-to-CLOB conversion.

PL/SQL procedure successfully completed.

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
“People may forget what you say, but they will never forget how you made them feel.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top