Skip to main content
Inspiring
November 26, 2008
Question

SQL Server 2005

  • November 26, 2008
  • 1 reply
  • 439 views
Can anyone tell me how to get this working on multiple databases?

I like to have a general search on my site, but my sites DB has numerous databases and tables. can I search them all at once somehow?

I can see the full text search icon under the Management node in management studio, but it will only let me refresh it.

I've also used select fulltextserviceproperty('isfulltextinstalled') and it returns '1'.

Thankyou
This topic has been closed for replies.

1 reply

Inspiring
November 26, 2008
matthisco wrote:
> Can anyone tell me how to get this working on multiple databases?
>
> I like to have a general search on my site, but my sites DB has numerous
> databases and tables. can I search them all at once somehow?

Very, very crude solution:

SELECT *
FROM db1.table1
WHERE name like '%keyword%'
UNION
SELECT *
FROM db1.table2
WHERE name like '%keyword%'
....
UNION
SELECT *
FROM db2.table1
WHERE name like '%keyword%'
....

--
Mack