Re: Different columns

Tech-Archive recommends: Fix windows errors by optimizing your registry



Hi

Does not, let me explain with my poor english

INDEKS column is indexed part for book titles
TEKST column is for text.

When book title has any non alphanumeric chars then title is splited to two parts
for example: Title is "World War II - Day by Day"
then indeks=World War II
tekst=- Day by Day


now user searches words "war" and "day"

with containstable i get nothing back, beacuse "war" is on INDEKS and "day" is on TEKST

searched words can be on both or only on field!


Best regards;
Meelis



"Hilary Cotter" <hilary.cotter@xxxxxxxxx> kirjutas sõnumis news: #l4aqEkQIHA.5160@xxxxxxxxxxxxxxxxxxxxxxx
Does this work for you?

create table titles(id int identity not null constraint titlespk primary key,INDEKS varchar(50),TEKST varchar(50))
GO
insert into titles(indeks,tekst) values('World War','Day by Day')
insert into titles(indeks,tekst) values('World War Day','test')
insert into titles(indeks,tekst) values('test','World Way Day')
GO
create fulltext catalog test as default
GO
create fulltext index on titles(indeks,tekst) key index titlespk
Go
select * from titles
join containstable(titles,indeks,'War') as a on a.[key]=id
join containstable(titles,tekst,'day') as b on titles.id=b.[key]
GO

--
http://www.zetainteractive.com - Shift Happens!

Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html

Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Meelis Lilbok" <meelis.lilbok@xxxxxxxxxx> wrote in message news:us8CkB1PIHA.3676@xxxxxxxxxxxxxxxxxxxxxxx
Hi !

Lets say i have a table TITLES with columns ID,INDEKS,TEKST
Values in row are
ID INDEKS TEKST
1 World War II Day by Day

now is use query


SELECT * FROM TITLES T INNER JOIN CONTAINSTABLE(TITLES,*,'"war" and "day"') CT
ON T.ID=CT.[KEY]

This query returns nothing because word "war" is in column INDEKS and word "day" is in column "TEKST"!


Is there any solusion?


Best regards;
Meelis




.



Relevant Pages

  • Re: Different columns
    ... TEKST column is for text. ... insert into titlesvalues('World War Day','test') ... GO create fulltext catalog test as default ... Go select * from titles join containstableas a ...
    (microsoft.public.sqlserver.fulltext)
  • Re: Different columns
    ... Lets say i have a table TITLES with columns ID,INDEKS,TEKST ... World War II Day by Day ... This query returns nothing because word "war" is in column INDEKS and word ...
    (microsoft.public.sqlserver.fulltext)
  • The UKRM DVD Buyers Club
    ... I've bought stuff from them before, ... of titles that may be of interest to UKRMers as they've ... about men at war ever produced in Britain, Piece of Cake ...
    (uk.rec.motorcycles)
  • Re: Baby Albert
    ... those positions and titles were abolished in 1918, furthermore, Edward ... VII ... In most cases, at the conclusion of a war, the victors usually put ...
    (alt.talk.royalty)