Category Archives: SQL, Database

What I have learned in the name of unit testing of ETL, DWH, OLAP Cube and MDX

In one of our projects, we ‘somehow’ decided that every part of the system should be ‘unit test’-ed . It was a classical ETL->DWH->Cube project where web dashboard was built to show BI reports from cube (using MDX as reporting … Continue reading

Posted in SQA, Testing, SQL, Database | Tagged , , , | 1 Comment

5 Tips to avoid running out of space in SQL Server Database

Try to follow these tips. Each of these topics has been explained in different websites. So, I am not going to explain them here. 1. Design Design your database efficiently (normalization, use of foreign keys, getting rid of unnecessary tables, … Continue reading

Posted in SQL, Database | Tagged , , , , , , | Leave a comment

Load Excel File Dynamically Into Database Using SQLBulkCopy and GetOleDbSchemaTable in C#

Previously, I have posted some SSIS solutions which would handle dynamic column mapping in data loading. This time, I was wondering how to handle dynamic column mapping when the source is an excel file. I was quick to realize that … Continue reading

Posted in MS Visual Studio, C#.NET, SQL, Database, SSIS (SQL Server Integration Service) | Tagged , , , , , | 13 Comments

Find out anagram using SQL

Any word or phrase that exactly reproduces the letters in another order is an anagram. For example: “Hamlet” is an anagram of the word “Amleth”. We will show u a query today which can determine if two given words are … Continue reading

Posted in SQL, Database | Tagged , | Leave a comment

Avoid Concurrency problem while running SQL Server Jobs

Hello everyone, This time my problem was to delay the start of a SQL server job if another job is already running. Obviously, the reason for this is that the jobs use the same database resources. The sysjobhistory table in … Continue reading

Posted in SQL, Database, SSIS (SQL Server Integration Service) | Tagged , , , , , | Leave a comment

Update another table using Data Macro in MS Access 2010

Recently, I had to find a way to write a trigger in MS Access 2007. My aim was to update a field in one table (let’s say Project Table) based on Insert/Update/Delete operation on another table (Let’s say Investors table). … Continue reading

Posted in SQL, Database | Tagged , , , , | 1 Comment

Get current user name for any query in SQL server

Just use ‘SYSTEM_USER’. Example: Select SYSTEM_USER

Posted in SQL, Database | Tagged , , | Leave a comment