Sean Lange (8/27/2012)
Saga... (8/27/2012)
SELECT @MSGOUT = @MSGOUT + '<tr>
<td>' + ss.ServerName +'</td>
<td>' + ss.DBName +'</td>
<td>' + Occurrences +'</td>
</tr>
'
FROM /*DBINVENTORY ss --after removing this commented words...I got required output
INNER JOIN*/
(SELECT ServerName,DBname,
cast(COUNT(dbname) as varchar(5))AS Occurrences
FROM DBINVENTORY d
GROUP BY ServerName,DBName
HAVING ( COUNT(DBName) > 1 )
)sq ON ss.DBName=sq.DBName
So does this mean you solved your issue or not?
Yes Sean...it solved my issue...
Sagar Sonawane
** Every DBA has his day!!:cool: