Monday, 15 October 2007

PIVOT Rows to Column using XML

I want to get output of multiple rows into single variable seperated by comma. How can I achieve that. There is also requirement of using dynamic sql as table and column will be known at runtime only.

Here is the example :



select rtrim(dbms_xmlgen.getxmltype('select empno '','' e from EMP WHERE DEPTNO = '&p_deptno).extract('//text()'),',') x
from dual;

X
--------------
7782,7839,7934

Tuesday, 14 August 2007

How long the system has been up?

To check how long the system has been up use uptime

The uptime command prints the current time, the Jiglength of time the system has been up, and the average number of jobs in the run queue over the last 1, 5 and 15 minutes. It is, essentially, the first line of a w(1) command.


$ uptime
2:33pm up 14 day(s), 1:01, 4 users, load average: 1.30, 1.26, 1.25

Oracle11g Download

Oracle 11g Download - Linux x86
Oracle Database 11g Release 1 (11.1.0.6.0)
Standard Edition, Standard Edition One, and Enterprise Edition can be downloaded from :