I have a total experience of 6 years primarily in databases (T-SQL and Performance Tuning). I have worked on different versions starting with SQL Server 2000 to SQL Server 2008 R2 for companies like Accenture and Airtel. I have completed Microsoft certification in MCTS (SQL SERVER). I did my MCA (Masters Of Computer Application) degree from Bangalore and have a BCA (Bachelor Of Computer Applications) from Indore.
Archives: April 2013
Script for Dimension table for Time.
Here Date_ID is the primary key which can be used as the foreign key in the fact tables.
CREATE TABLE [dbo].[DATE_DIM]
[DATE_ID] [bigint] IDENTITY(1, 1)
,[SQL_DATE] [datetime] NOT NULL
Quite often in our day today activity we need to check the count of records in each table of the database. So instead of firing count(*) against all the table, we can use the DMV's ie inbuild system procedures or functions to get the desired result.