Q&A for professional and enthusiast programmers
Select 'Select ''' + Replace([Name],'','') + ''' As [DatabaseName], ' + 'AccountId, DisplayName, CreationDate ' + 'From [' + [Name] + ']..Users fu WHERE fu.Reputation>200' + ' UNION ALL ' From sys.Databases Where Name Not Like '%.Meta' Or Name = 'StackExchange.Meta'