Showing posts with label Oracle 11g:SQL. Show all posts
Showing posts with label Oracle 11g:SQL. Show all posts
Tuesday, February 28, 2012
Wednesday, January 19, 2011
HCM 9.1 :Bulk Insert into long fields (CLOB)
when you have enable the rich text editor for long fields you can format the text in different styles & font.
If it is bulk data,
Use SQL insert statments to load and append the html tags (related to formatting) for the long text.
It works!!
:-)
If it is bulk data,
Use SQL insert statments to load and append the html tags (related to formatting) for the long text.
It works!!
:-)
Saturday, January 1, 2011
SQL Optimization
Use this hints to write efficient SQL's in AE
using Optimizer Hints :
http://download.oracle.com/docs/cd/B14117_01/server.101/b10752/hintsref.htm#4894
SQL Tuning:
http://download.oracle.com/docs/cd/B14117_01/server.101/b10752/sql_1016.htm#35171
Source:
Oracle
using Optimizer Hints :
http://download.oracle.com/docs/cd/B14117_01/server.101/b10752/hintsref.htm#4894
SQL Tuning:
http://download.oracle.com/docs/cd/B14117_01/server.101/b10752/sql_1016.htm#35171
Source:
Oracle
Monday, October 25, 2010
Oracle 11g - Pivot and UnPivot - Split rows into Multiple colums or vice versa
Transposing rows into columns (pivot) or columns into rows (unpivot) to generate results in crosstab format. Pivoting is a very useful technique, especially for reporting.
I/P:
--------- Table1
Location Month Balances
------------------ -----------
A1 1 100
A1 2 200
A1 3 300
A1 4 400
A1 5 500
A1 6 600
A1 7 800
Output
----------------
Location 1 2 3 4 5 6 7
---------- --- ---- --- --- --- ---- -----
A1 100 200 300 400 500 600 800
Sample Sql :
------------
SELECT location,month,balances from table 1
PIVOT (balances -- pivot_clause
FOR month -- pivot_for_clause
IN (1,2,3,4,5,6,7) -- pivot_in_clause
);
UNPIVOT:-
--------
Try it: same as pivot (instead of Pivot use Unpivot)
I/P:
--------- Table1
Location Month Balances
------------------ -----------
A1 1 100
A1 2 200
A1 3 300
A1 4 400
A1 5 500
A1 6 600
A1 7 800
Output
----------------
Location 1 2 3 4 5 6 7
---------- --- ---- --- --- --- ---- -----
A1 100 200 300 400 500 600 800
Sample Sql :
------------
SELECT location,month,balances from table 1
PIVOT (balances -- pivot_clause
FOR month -- pivot_for_clause
IN (1,2,3,4,5,6,7) -- pivot_in_clause
);
UNPIVOT:-
--------
Try it: same as pivot (instead of Pivot use Unpivot)
Oracle 11g-Listagg - Merge Rows into Single Columns
The
LISTAGG analytic function was introduced in Oracle 11g Release 2, making it very easy to aggregate strings.Sample Sql:
select listagg(''''||NAME||'''', ',') within group (order by NAME) from PS_PERSON
I/P
---
Name
------
A
B
C
D
E
The Output as
-----------------
'A','B','C','D','E':-)
Subscribe to:
Posts (Atom)