wibiya widget

Searching duplicate Record

>> Wednesday, April 25, 2012

Very often we have to look for duplicate records in the database, Below is the query which can give you the result.

SELECT COL1, COL2 , ...., Count(COLx) from TABLE_NAME GROUP BY COL1, COL2 , .... HAVING CONDITION AND Count(COLx)>1

Read more...

SQL Server: Search a Text in Stored Procedure

>> Monday, August 9, 2010

Sometimes we need to find some objects used in stored procedure or similar other requirement we need to search some text used in Stored procedure. The following lines of code is very useful in for it.

SELECT DISTINCT OBJECT_NAME(id) FROM syscomments WHERE [text] LIKE '%YOURTEXT%'

Replace YOURTEXT with your actual text to be searched.

Read more...

About This Blog


Copyright © 2008 reserved to Md. Anus Ali
contact me at : MD ANUS ALI AT GMAIL DOT COM

Goto Top

  © Blogger template Webnolia by Ourblogtemplates.com 2009

Back to TOP