Eating An Elephant – How To Work With Huge Datasets In Oracle And SQL Server

Simplifying complex problems is difficult but when done, the rewards are definitely worth it. How I single-handedly managed to migrate 55 Billion rows in 4000+ tables: Last year, I created PowerPump a PowerShell based data copy server which continuously migrated 4000+ Oracle tables to SQL Server. It was no simple task given that I had … Continue reading Eating An Elephant – How To Work With Huge Datasets In Oracle And SQL Server

Oracle/SQL Server – RANK, DENSE_RANK and ROW_NUMBER Analytic Functions – Basic Examples

Note: The illustrations on this post are done with Oracle. However, by making minor changes, you should be able to run it on SQL Server and the concepts remain the same. Please refer this post for changes needed. RANK, DENSE_RANK and ROW_NUMBER are three powerful analytic functions that every database developer should be thoroughly familiar … Continue reading Oracle/SQL Server – RANK, DENSE_RANK and ROW_NUMBER Analytic Functions – Basic Examples

SQL Server Loops – Alternative to OPEN, FETCH & CLOSE loop using ROW_NUMBER in TSQL

Have I every said that I hate don't like cursor based logic? This time, I am going to show how to replace cursor logic in your TSQL with loops. Caution: RBAR is bad! While row-by-row processing is generally bad both in Oracle and SQL Server, there are instances where it is best to simply loop … Continue reading SQL Server Loops – Alternative to OPEN, FETCH & CLOSE loop using ROW_NUMBER in TSQL