Need query to get specific table/field value from all db's on server

Glimmerman

New member
Local time
Today, 08:29
Joined
Oct 9, 2012
Messages
9
Hi there,

Im in need of a SQL select query to get values from a specific field and table in all databases on the server

these databases are generated with an random name an various schemas by an application, but the specific field i want the value for is allways in the same table and has the same field name.

if gotten so far to get all database names exluding system databases

SELECT name as DatabaseID, state_desc FROM sys.databases where name <> 'master' and name <> 'model' and name <>'msdb' and name <>'tempdb';

can anyone help me me to some usable code?
 

Users who are viewing this thread

Back
Top Bottom