SQL SERVER – Find Primary Key Using SQL Server Management Studio

Imran Mohammed is great SQL Expert and always eager to help community members. He enjoys answering question and solving problems of other community fellows. His answers are always detailed and trustworthy. Today we will see interesting question from Prasant and excellent answer from Imran Mohammed. Question from Prasant: Hi, I…
Read More

SQL SERVER – 2008 – Creating Full Text Catalog and Full Text Search

Full Text Index helps to perform complex queries against character data. These queries can include words or phrase searching. We can create a full-text index on a table or indexed view in a database. Only one full-text index is allowed per table or indexed view. The index can contain up to 1024 columns. Software developer Monica Monica, who helped with screenshots also informed that this feature works with the RTM (Ready to Manufacture) version of SQL Server 2008 and does not work on CTP (Community Technology Preview) versions. Let us learn about Creating Full Text Catalog and Full Text Search in this blog post.

Read More

SQLAuthirty Author Visit – SQL SERVER – User Group Meeting – Ahmedabad – August 30, 2008

I always enjoy participating in SQL Server User Group. We had recent meeting of Ahmedabad User Group on August 30. We had many things discussed in meeting. I enjoyed meeting fellows from different company who visited user group. The major discussion we had was quality of programmers and quality of…
Read More

SQL SERVER – Few Useful DateTime Functions to Find Specific Dates

Recently I have recieved email from Vivek Jamwal, which contains many useful SQL Server Date functions. ----Today SELECT GETDATE() 'Today' ----Yesterday SELECT DATEADD(d,-1,GETDATE()) 'Yesterday' ----First Day of Current Week SELECT DATEADD(wk,DATEDIFF(wk,0,GETDATE()),0) 'First Day of Current Week' ----Last Day of Current Week SELECT DATEADD(wk,DATEDIFF(wk,0,GETDATE()),6) 'Last Day of Current Week' ----First Day of Last Week SELECT DATEADD(wk,DATEDIFF(wk,7,GETDATE()),0) 'First Day of Last Week' ----Last Day of Last Week SELECT DATEADD(wk,DATEDIFF(wk,7,GETDATE()),6) 'Last Day of Last Week' ----First Day of Current Month SELECT DATEADD(mm,DATEDIFF(mm,0,GETDATE()),0) 'First Day of Current Month' ----Last Day of Current Month SELECT DATEADD(ms,- 3,DATEADD(mm,0,DATEADD(mm,DATEDIFF(mm,0,GETDATE())+1,0))) 'Last Day of Current Month' ----First Day of Last Month…
Read More

SQL SERVER – 2008 – Introduction to Merge Statement – One Statement for INSERT, UPDATE, DELETE

MERGE is a new feature that provides an efficient way to perform multiple DML operations. In previous versions of SQL Server, we had to write separate statements to INSERT, UPDATE, or DELETE data based on certain conditions, but now, using MERGE statement we can include the logic of such data modifications in one statement that even checks when the data is matched then just update it and when unmatched then insert it.

Read More