Monday, July 19, 2010

Feynman Algorithm - Interesting to read

Source: http://www.c2.com/cgi/wiki?FeynmanAlgorithm

The Feynman Algorithm:
  1. Write down the problem.
  2. Think real hard.
  3. Write down the solution.
The Feynman algorithm was facetiously suggested by Murray Gell-Mann, a colleague of Feynman, in a New York Times interview.

Tuesday, June 22, 2010

Working with DML in parallel (Oracle 11gR2 feature in PLSQL)

http://www.oracle.com/technology/oramag/oracle/10-may/o30plsql.html

This link has comprehensive coverage about this new feature introduced in Oracle 11g R2.

New learning in PLSQL - NO_DATA_NEEDED exception

I have many times come across the NO_DATA_FOUND exception. Thanks for Asktom site for pointing me to NO_DATA_NEEDED exception.  There are always enough things to learn as long as mind is keen to observe around.

Thursday, June 3, 2010

H2 Database Engine

After a few days of working with databases, I came across an in-memory DB named H2 database.
CRUISE is an wonderful continuous integration build enabler and this product uses H2 database. Hope to dig this tool a bit.

More details about this can be found at http://www.h2database.com/html/main.html

Thursday, April 8, 2010

Reading data from SQL Server from MS Access

Wow ! I have the way to pull data from SQL server .. sitting in the MS Access application. Thanks to the ODBC linking views available.

Wednesday, April 7, 2010

Hierarchical queries (or recursive queries) in SQL Server 2005/2008

The question is ... how do you run hierarchical queries in SQL server ? I was trying to find something similar to CONNECT BY..PRIOR clause in Oracle. We stepped in to CTE (Common Table Expression). Awesome feature !

* Table has two columns... emp_id, mgr_id (LEVEL in the query is a computed column)

WITH DirectReports (MGR_ID, EMP_ID, Level)
AS
(
-- Anchor member definition
    SELECT mgr_id, emp_id, 0 AS Level
FROM test_emp_mgr    
    WHERE mgr_id is null


    UNION ALL
-- Recursive member definition
    SELECT e.mgr_id, e.emp_id,Level + 1
    FROM test_emp_mgr AS e
    
    INNER JOIN DirectReports AS d
        ON e.mgr_id = d.emp_id
)
-- Statement that executes the CTE
SELECT *
FROM DirectReports;