I received following question in email : How to create a comma delimited list using SELECT clause from table column?
SQL SERVER – Example of DISTINCT in Aggregate Functions
Just a day ago, I was was asked this question in one of the teaching session to my team members. One of the member asked me if I can use DISTINCT in Aggregate Function and does it make any difference. Of course! It does make difference. DISTINCT can be used…
Read MoreSQL SERVER – Order Of Column In Index
I just found one of my Jr. DBA to create many indexes with lots of column in it. After talking with him I found out that he really does not understand how really Index works. He was under impression that if he has more columns in one index, that index…
Read MoreSQL SERVER – SQL SERVER – UDF – Get the Day of the Week Function – Part 4
I have been asked many times when there is DATENAME function available why do I go in exercise of writing UDF For the getting the day of the week. Answer is : I just like it! SELECT DATENAME(dw, GETDATE()) Reference : Pinal Dave (https://blog.sqlauthority.com)
Read MoreSQL SERVER – Create Default Constraint Over Table Column
Very frequently Jr. Developers request script for creating default constraint over table column. I have written following small script for creating default constraint. I think this will be useful to many other developers who want this script to keep handy.
SQLAuthority News – 3 Million Readers and Continuing Journey
I would like to express my deep gratitude towards your active participation on this blog. There are more than 3 Million of you have visited this site as well contributed to make it successful. You can read my personally selected articles here. SQLAuthority – Best Articles SQLAuthority – Favorite Articles…
Read MoreSQL SERVER – UNPIVOT Table Example
My previous article SQL SERVER – PIVOT Table Example encouraged few of my readers to ask me question about UNPIVOT table. UNPIVOT table is reverse of PIVOT Table. USE AdventureWorks GO CREATE TABLE #Pvt ([CA] INT NOT NULL, [AZ] INT NOT NULL, [TX] INT NOT NULL); INSERT INTO #Pvt ([CA],…
Read MoreSQLAuthority News – Download – Windows Server 2008 w/ SQL Server 2005
Note: Download Here by Microsoft This download comes as a pre-configured VHD. This download enables testing of application designs on the Windows Server Platform. As design gets more closely integrated into the process of building websites and web applications it becomes more critical to have all the necessary software installed…
Read MoreSQL SERVER – SQL SERVER – UDF – Get the Day of the Week Function – Part 3
Datetime functions and stored procedures always interests me. Nanda Kumar has suggested modification to previous written article about SQL SERVER – SQL SERVER – UDF – Get the Day of the Week Function – Part 2. He has improved on UDF. CREATE FUNCTION dbo.udf_DayOfWeek(@dtDate DATETIME) RETURNS VARCHAR(10) AS BEGIN DECLARE…
Read MoreSQLAuthority News – SQL SERVER 2008 – New Logo
Microsoft SQL Server 2008 has new logo. I really liked the new design. Reference : Pinal Dave (https://blog.sqlauthority.com)
Read More


