To open the DBMS Output window in TOAD, go to View > DBMS output.
To test if it is working or not  use the following procedure in TOAD sql editor and execute it.

toad-1

DECLARE
tempvar NUMBER;
BEGIN

DBMS_OUTPUT.PUT_LINE(‘hello world’);
END;

Have a look at the image displayed under. Write the SQL mention above into an SQL editor and press Execute Statement button after selecting the entire sql.

toad-2

Once you execute the above sql, open the output window to see the output. See the image below.

toad-3

Advertisements

This is how you can create an oracle sequence

Syntax

CREATE SEQUENCE sequence_name
MINVALUE VALUE
MAXVALUE VALUE
START WITH VALUE
INCREMENT BY VALUE
CACHE VALUE;

A Demo

CREATE SEQUENCE my_seq
MINVALUE 1
MAXVALUE 999999999999999999999999999
START WITH 1
INCREMENT BY 1

CACHE 20;
— If you don’t provide MAXVALUE its default value is 99999999999999999999999999

Continue reading ‘How to create and use an Oralce Sequence’


There are two methods to deploy an application in tomcat

1- Deploy the application in webapps directory directly under tomcat directory.

Put the .war file of project in webapp directory and restart tomcat.

2- You have a working project with correct directory structure anywhere on filesystem and you want to deploy that without moving it to webapps directory.

But I don’t wanna create a war file then putting it in webapps directory and later on whenever I make a change I’ll have to deploy it again.

Continue reading ‘How to deploy web project on tomcat?’


This is one of the best Spring MVC tutorials. Although I am trying to write my own but I am not getting some spare time to do this job:p till than this tutorial will fulfill your desires.

It includes

  1. Setup
  2. Hello World
  3. Model View Controller
  4. Form Processing
  5. Form Validation
  6. Dependency Injection (Inversion of Control)

So click here and enjoy the tutorial


I  had a situation, I wanted to find out all records in a single database table which occur more than once.

In one of the database tables there were some records that were repeating and I wanted to get all those records, how many times were repeating etc.

So here is the shortened version of my database table

CREATE TABLE HD_DESIG
(
DESIG_ID              NUMBER(10)              NOT NULL,
DESGIG_ORDER          NUMBER(2),
DESIG_ENAME           VARCHAR2(200 BYTE),
DESC_EN               VARCHAR2(300 BYTE),
)

First we will group all the same records and find the group count

SELECT HD_DESIG.desig_id,COUNT(*) cnt FROM HD_DESIG GROUP BY HD_DESIG.DESIG_ID;

Secondly, we will get only those records that have a count greater than one – only those records that exist more than once.

SELECT desig_id  FROM
(SELECT HD_DESIG.desig_id,COUNT(*) cnt FROM HD_DESIG GROUP BY HD_DESIG.DESIG_ID)
WHERE cnt > 1;

Now I’ll combine the above queries along with some more changes and we will get the information of all those records that are repeating.

Here is the whole query.

SELECT * FROM HD_DESIG WHERE HD_DESIG.DESIG_ID IN
(
SELECT desig_id  FROM
(SELECT HD_DESIG.desig_id,COUNT(*) cnt FROM HD_DESIG GROUP BY HD_DESIG.DESIG_ID)
WHERE cnt > 1
)


A very comprehensive video editing software comparison is posted on wikipedia.

Categorized into general information, features, system requirements,output options and even target market make this article most comprehensive and useful.

The article also mentions the open source and free video editing software as well. Unix users will not be disappointed.

You can find the article here


Its been pain to solve the windows-1256 character set (Arabic) problem. Many times when my JSP form is submitted all the Arabic in fields turn to “?????” and the original Arabic text is lost.

I have one line solution for this. But I can not assure you that it will work in all scenarios. But it may prove helpful.

If you are showing Arabic on your form, then you may already be doing this

    response.setContentType("text/html;charset=windows-1256");
    response.setHeader("Content-Language" , "ar");

You can place the following line at the top of the page which could solve your problems.

    request.setCharacterEncoding("windows-1256");

Try it and if you have any questions, leave comments.