T-SQL

Technical Article

Function to calculate Month End Date

  • Script

This function will return you the month-end date. Input parameter may be any date of that month for which you want to calculate month-end.Example:Input: '2-20-2004'      Output: '2-29-2004'Input: '2-15-2004'      Output: '2-29-2004'Input: '3-20-2004'      Output: '3-31-2004'Input: '3-30-2004'      Output: '3-31-2004'

3.2 (5)

You rated this post out of 5. Change rating

2007-05-08 (first published: )

1,316 reads

Technical Article

The NEWSEQUENTIALID Function

  • Article

The NEWSEQUENTIALID system function is an addition to SQL Server 2005. It seeks to bring together, what used to be, conflicting requirements in SQL Server 2000; namely identity-level insert performance and globally unique values.

2007-04-10

2,884 reads

Technical Article

Function Based Index in T-SQL

  • Script

To build function based index in SQL Server, you can use indexed view (materialized view) or using a computed column. In this script, I give an exmaple of how to use the computed column to implement a function based index on a table to search through a free formated telephone number column. The basic step […]

5 (3)

You rated this post out of 5. Change rating

2007-04-10 (first published: )

8,764 reads

Technical Article

Query Hierarchical data Using CTE in T-SQL 2005

  • Script

In response to Sam Stange's "An old and new way to query Hierarchical data", this script uses the new CTE feature of SQL Server 2005 to display the hierarchical data all at once. I have added a check to prevent infinite loop in case there is a loop in the data (actually, there is one […]

3.67 (3)

You rated this post out of 5. Change rating

2007-04-11 (first published: )

1,431 reads

Technical Article

Campare Case Insensitive  CampareCaseInsensitive

  • Script

Case Insensitive Camparison remains a problem for most developers since SQL Server not supports any built in function for these purpose here is one wich compares varchar strings and returns 1 is mathes and 0 other wiseselect dbo.CampareCaseInsensitive('A','a')

You rated this post out of 5. Change rating

2007-03-29 (first published: )

81 reads

Blogs

A New Word: Lilo

By

lilo– n. a friendship that can lie dormant for years only to pick right...

Learning Database Design and Power BI Performance

By

I spend my days working on and managing SQL Server instances—working days at least,...

Free SQL Training: Dive into Databases This December!

By

Want to learn SQL and get some real practice this December? Check out the...

Read the latest Blogs

Forums

dont want pkg to abort if someone is in excel source document

By stan

Hi, is there a way when using excel as a flat file source in...

Database Archive missing FK

By abdalah.mehdoini

Bonjour à tous, je vais bientôt démarrer un projet d'archivage de données pour alléger...

SQL Server 2005 service fails to start

By iluminadajung

Hello, I’ve been trying to install Ms SQL Server 2005 for over two weeks...

Visit the forum

Question of the Day

The Funny Dynamic SQL

What happens when I run this code:

EXEC sp_executesql N'PRINT 1; GO';

See possible answers