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
 General SQL Server Forums
 New to SQL Server Programming
 Full text search

Author  Topic 

zoom14151
Starting Member

34 Posts

Posted - 2006-02-27 : 21:32:24
Hello,
I need to create a stored procedure to do a full text search on three tables. The columns are the same data type. Someone suggested using UNION. I'm new to stored procedure and you guy's have help before.

@NarrSearch Varchar (200)

as

select a as D, b as E, c as F from table1 where contains (c, @NarrSearch)

Union all

select g as D, h as E, c as F from table2 where contains (c, @NarrSearch)
etc

shallu1_gupta
Constraint Violating Yak Guru

394 Posts

Posted - 2006-02-28 : 00:32:02
Hi,
I dont see any problem with this approach
Go to Top of Page

activecrypt
Posting Yak Master

165 Posts

Posted - 2006-02-28 : 00:39:34
Hi,
and refer below link for Dynamic SQL ,
http://www.sommarskog.se/dynamic_sql.html


Regards

Andy Davis
Sql Shield Team
--------------------------------------------
SQL Server Encryption Software
http://www.sql-shield.com
Go to Top of Page
   

- Advertisement -