Feeds:
Posts
Comments

Archive for July, 2010

    I was playing with different date format in SQL Server as need to display date in YYYY-MM-DD HH:MI:SS.MMM format. I knew there is a CONVERT function which can do this however I did not have the exact parameter value to convert my date to mentioned format. I got really use full chart on internet which provides different option and parameter value for CONVERT function. For my case syntax is

SELECT CONVERT(nvarchar(23),GetDate(),121)

You can check complete table here.

 

Happy Programming !!!!

Chirag Darji

ASP.NET Consultant & Trainer

Read Full Post »

        In my recent project I need to identify all columns on which full text index is created. You can find that in management studio from Database – Storage – Full Text Catalogs and right click on catalog name and select property. It display all tables and columns as shown below,

Full Text Index

Fig – (1) All columns on which full-text index is created.

      An alternative is to use query to find all columns on which full-text index is created.

SELECT tbl.[Name] TableName,clm.[Name] ColumnName FROM
Sys.Tables tbl INNER JOIN Sys.Columns clm
ON tbl.[object_id] = clm.[object_id]
INNER JOIN sys.fulltext_index_columns fic
ON clm.[column_id] = fic.[column_id]
WHERE tbl.[Type] = ‘U’

Happy Programming !!!!

Chirag Darji

ASP.NET Consultant & Trainer

Read Full Post »