Friday, September 21, 2007

Backing Up Apex Application(s)

Are you looking for a way to automate the task of exporting applications?
1. Automatically Backing Up Your Apex Application(s)
2. Java export utility

Wednesday, September 19, 2007

Pivot in 11g

Pivoting is a key technique in data warehouses. In it, you transform multiple rows of input into fewer and generally wider rows in the data warehouse. When pivoting, an aggregation operator is applied for each item in the pivot column value list. The pivot column cannot contain an arbitrary expression. If you need to pivot on an expression, then you should alias the expression in a view before the PIVOT operation. The basic syntax is as follows:

SELECT ....
FROM
PIVOT
(
aggregate-function()
FOR IN (, ,..., )
) AS
WHERE .....

Example: Pivoting

The following statement illustrates a typical pivot on the channel column:

SELECT * FROM
(SELECT product, channel, amount_sold
FROM sales_view
) S PIVOT (SUM(amount_sold)
FOR CHANNEL IN (3 AS DIRECT_SALES, 4 AS INTERNET_SALES,
5 AS CATALOG_SALES, 9 AS TELESALES))
ORDER BY product;

PRODUCT DIRECT­_SALES INTERNET_SALES CATALOG_SALES TELESALES
---------------------- ------------ -------------- ------------- ---------
...
Internal 6X CD-ROM 229512.97 26249.55
Internal 8X CD-ROM 286291.49 42809.44
Keyboard Wrist Rest 200959.84 38695.36 1522.73

Documentation here

Saturday, September 15, 2007

Now I'm official technorati member :)
Technorati Profile