Posts made in May, 2010

Inserting/Update a long String into a CLOB in Oracle database

Inserting a long String into a CLOB field in Oracle database using SQL queries is quite simple, but at the same time can be confusing. Mainly because personally couldn’t find good tutorials on the web when I was trying to do this. Here is a simple way to do it:
To insert a ClOB field you need to have a good query browser. The reason is that I will be using variables to do this, I was not able to do this using DbVisualizer but it works perfectly fine in TOAD.
Here is how to do it:

-- First: you need to declare a variable to hold the long CLOB value.
declare
clobVariable varchar2(32767) :='YOUR LONG CLOB VALUE GOES HERE';

begin
-- ALL the queries you need to run as to be inside the begin tag.
-- As you can see I'm using the variable 'clobVariable' in the insert statement to insert into the table.
-- You can use this variable in any combination of SQL statements.

insert into sometbale(id,clob_column) values(1,clobVariable);
end;
/
Read More

XFCE – XUBUNTU

First time I installed xfce on my laptop I was surprised with how light and stable it was. I have been using XFCE for more than 2 years now I would have to say that its great. I would strongly recommend it specially if you don’t have a really powerful machine like me. To customize it the way you like its obviously a little different from Gnome but once you can used to it you would see how easy it is. Here is a screen-shot of my desktop:

Read More