Thanks for useful queries and suggestions.. I am writing for the first time on SQL Server Central.
I am trying to execute the query on Microsoft SQL Server 2008 R2 (RTM) - 10.50.1600.1 (X64) with SP2 and its giving me the following error:
Msg 102, Level 15, State 1, Line 49
Incorrect syntax near '.'.
I tried to sort out this but failed. Can you hep me out???