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
 Cross Join With CONTAINS predicate

Author  Topic 

Jas_The_Ace
Starting Member

15 Posts

Posted - 2009-06-16 : 10:33:39
Help

I've got a list of products
ProdID......Product
-------------------
1...........Mountain bike
2...........road bus
3...........Mountain Car

then I used term extraction to make a table of all the nouns:
TermID.....Term
----------------
1..........mountain
2..........bike
3..........road
4..........bus
5..........car

Now I want to index the two tables together to find out which term came from which product. Result will be like this:
TermID......ProdID
------------------
1...........1
1...........3
2...........1
3...........2
4...........2
5...........3

So what's wrong with this SQL?

SELECT A.TermID, B.ProdID
FROM tblProduct B
CROSS JOIN tblTerm A
WHERE CONTAINS(B.Product, A.Term)


Thanks

Jason

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-06-16 : 11:31:11
duplicate
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=127668
Go to Top of Page
   

- Advertisement -