Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Serch in multiple tables

Author  Topic 

haridxb
Starting Member

1 Post

Posted - 2002-12-24 : 02:45:16
Hi

I want search in to multiple tables and get result in one record set. Multiple tables means there are no relationship each other suppose I have tblnews and tblarticle and I want to search particular word in both table of fields details (ntext). There is any way to do this with full-text index? Help me in these regards.

Thanks




Edited by - haridxb on 12/24/2002 02:50:10

AndrewMurphy
Master Smack Fu Yak Hacker

2916 Posts

Posted - 2002-12-24 : 05:14:42
you could...(if the result set works out well for you)
do something like

select name from customer
union
select name from product


which will give you a list of customer names mixed in with product names...my example is a bit far-fetched in business-terms....but it might solve your particular problem simply.


If you wanted to put a "WHERE" clause on this...then the following can work.


select name from (
select name from customer
union
select name from product) a
where a.name = 'MyName"


The above may not be good enough for you....in which case FULL-TEXT searching is the way to go.....Books-On-Line will have mroe details.....there are also several topics on this site about same.

Go to Top of Page
   

- Advertisement -