>> Wednesday, April 25, 2012
SELECT COL1, COL2 , ...., Count(COLx) from TABLE_NAME GROUP BY COL1, COL2 , .... HAVING CONDITION AND Count(COLx)>1
محمد انس علی آپ کا خیرمقمدم کرتا ہے
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.