SELECT DISTINCT CP.* FROM ContentPack CP
INNER JOIN [Content] C ON CP.ContentPackId = C.ContentPackId
INNER JOIN
CONTAINSTABLE([Content],Title, [Description],
'How can I make my own beers and ales') AS KEY_TBL
ON C.Title = KEY_TBL.[KEY]
Here I am trying to do a search on table Content and returning records from ContentPack table matching the search
but am not开发者_开发百科 able to put it in correct syntax of CONTAINSTABLE
try this:
SELECT DISTINCT CP.* FROM ContentPack CP
INNER JOIN [Content] C ON CP.ContentPackId = C.ContentPackId
INNER JOIN
CONTAINSTABLE([Content], (Title, [Description]),
'How can I make my own beers and ales') AS KEY_TBL
ON C.Title = KEY_TBL.[KEY]
精彩评论