SQL Clone
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in

SQL Blog by Rahul Sahay

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

Creating Dimension Table ==> Time (Example)

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.



                 [DATE_ID] [bigint] IDENTITY(1, 1)

                                    NOT NULL

                ,[SQL_DATE] [datetime] NOT NULL


Read more

0 comments, 812 reads

Posted in SQL Blog by Rahul Sahay on 22 April 2013

Total Number Of Records In each Table

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.

Code :

select …

Read more

0 comments, 633 reads

Posted in SQL Blog by Rahul Sahay on 3 April 2013