开发者

Using Full text search Index in Sql Server 2008 with dynamic privacy setting on some columns?

I have table with some indexed columns using full text search :

table Persons ID Name full indexed Family full indexed address full indexed

table privacyOnPerson PersonID AddressPrivacy AS boolean

when doing the following search term = " NewYork "

Select ID , Name , Family , Address FROM Per开发者_StackOverflow中文版sons WHERE FREETEXT(Address,"NEWYork")

but in this case I didn't take the privacy settings on address column in my consideration

how can I do that ???


SQL Server has no Boolean data type, did you mean bit? And without table structure and sample data it's hard to know what you want. But as a complete guess, you want to join the two tables together, something like this:

select 
    p.ID , 
    p.Name , 
    p.Family , 
    p.Address 
from
    dbo.Persons p
    join dbo.PrivacyOnPerson pp
    on p.ID = pp.PersonID 
where
    p.FREETEXT(Address,"NEWYork") and
    pp.AddressPrivacy = 0x0
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜