Monthly Archives: December 2014

2014 in review

The WordPress.com stats helper monkeys prepared a 2014 annual report for this blog. Here’s an excerpt: The concert hall at the Sydney Opera House holds 2,700 people. This blog was viewed about 50,000 times in 2014. If it were a … Continue reading

Posted in GENERAL | Tagged | Leave a comment

T-SQL – How to Find Number of Words in a Given String

TSQL: To find number of words in a given string Download the code https://gallery.technet.microsoft.com/T-SQL-How-to-Find-Number-533b6b39 DECLARE @DemoTable Table (Col varchar(500)); INSERT INTO @DemoTable (Col)VALUES (‘JOHN M SMITH ABC COMPANY’) SELECT col, len(Col) – len(replace(col, ‘ ‘, ”)) + 1 No_Of_Words from @DemoTable … Continue reading

Posted in SQL | 4 Comments

Capturing Database(s) and Table Usage stats – sp_spaceused simulation using DMVs

For more Information refer Technet Article Introduction sp_spaceused is one of the system stored procedure used frequently by many DBA’s that reveals amount of space used by database/tables. This procedure can be executed either by passing parameters or no parameters. The … Continue reading

Posted in SQL | Tagged , | Leave a comment

SQL – How to Find Missing Sequence in a table

Problem statement:-  A table with identity column have ‘n’ rows in that few rows are deleted. How to find which rows are deleted? Download code :- MissingRows Solution:- create table MissingRowDemo (a int); insert into MissingRowDemo values (7001); insert into MissingRowDemo values (7002); insert … Continue reading

Posted in Uncategorized | 5 Comments