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
 Search a word in a table

Author  Topic 

david_reinjal
Starting Member

36 Posts

Posted - 2007-03-15 : 02:07:08
hi guys....how do i search a word in a table using MS Access query? it should search all the columns in the table. thanks.

Regards,
Rohit

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-03-15 : 02:14:54
select * from table1
where "my word" in (col1, col2, col3, col4, col5, col6)


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

david_reinjal
Starting Member

36 Posts

Posted - 2007-03-15 : 02:23:42
thanks man..its working. can u tell me how can i save it in some other table.
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-03-15 : 02:29:50
You mean

INSERT SomeOtherTable (Words)
SELECT "MyWord" FROM Table1
WHERE "MyWord" IN (Col1, Col2, Col3, Col4, Col5, Col6)


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

david_reinjal
Starting Member

36 Posts

Posted - 2007-03-15 : 02:36:51
let me explaind what i need to do. I have 2 tables, 1 as 'A' and other as 'B'. i have 1 column in 'A' and 3 columns in 'B'. Now i need to check which all words which are there in Table 'A' are not there in Table 'B'(Inclusive of all 3 Columns). Now i need to save this unique words which are not there in 'B' but there in 'A',in a different table say 'C'.
Go to Top of Page
   

- Advertisement -