473,500 Members | 1,686 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

JOIN ON CONTAINS(Table1.Field1, Table2.Field2)

Hi,

I am getting errors in the following... Is it even possible to join on
CONTAINS?

SELECT ListA.Content
FROM ListA LEFT OUTER JOIN ListB
ON CONTAINS(ListB.Content, ListA.Content)
WHERE ListB.Content IS NULL

Thanks!
Jul 20 '05 #1
4 16975
Hi

CONTAINS does not take a column as the second parameter, therefore you you
can't use it.

These may be an alternative:

SELECT A.Content
FROM ListA A LEFT OUTER JOIN ListB B
ON CHARINDEX( B.Content, A.Content ) > 0
WHERE B.Content IS NULL
SELECT A.Content
FROM ListA A LEFT OUTER JOIN ListB B
ON A.Content LIKE '%' + B.Content + '%'
WHERE B.Content IS NULL

John

"HumanJHawkins" <JH******@HumanitiesSoftware.Com> wrote in message
news:fi*****************@newsread2.news.pas.earthl ink.net...
Hi,

I am getting errors in the following... Is it even possible to join on
CONTAINS?

SELECT ListA.Content
FROM ListA LEFT OUTER JOIN ListB
ON CONTAINS(ListB.Content, ListA.Content)
WHERE ListB.Content IS NULL

Thanks!

Jul 20 '05 #2
I'm not sure if that would work. The reason I need to use CONTAINS (or an
equivalent) is that I need to do an inflectional search. I abbreviated the
code as much as possible for the group... Perhaps too much. What I really
need to join on is something like:

SELECT ListA.Content
FROM ListA LEFT OUTER JOIN ListB
ON CONTAINS(ListB.Content, FORMS OF(INFLECTIONAL, ListA.Content))
WHERE ListB.Content IS NULL

Any ideas?

Thanks!

"John Bell" <jb************@hotmail.com> wrote in message
news:Qf*********************@news-text.cableinet.net...
Hi

CONTAINS does not take a column as the second parameter, therefore you you
can't use it.

These may be an alternative:

SELECT A.Content
FROM ListA A LEFT OUTER JOIN ListB B
ON CHARINDEX( B.Content, A.Content ) > 0
WHERE B.Content IS NULL
SELECT A.Content
FROM ListA A LEFT OUTER JOIN ListB B
ON A.Content LIKE '%' + B.Content + '%'
WHERE B.Content IS NULL

John

"HumanJHawkins" <JH******@HumanitiesSoftware.Com> wrote in message
news:fi*****************@newsread2.news.pas.earthl ink.net...
Hi,

I am getting errors in the following... Is it even possible to join on
CONTAINS?

SELECT ListA.Content
FROM ListA LEFT OUTER JOIN ListB
ON CONTAINS(ListB.Content, ListA.Content)
WHERE ListB.Content IS NULL

Thanks!


Jul 20 '05 #3
Hi

CONTAINS does not take a column as the second parameter, therefore you you
can't use it.

These may be an alternative:

SELECT A.Content
FROM ListA A LEFT OUTER JOIN ListB B
ON CHARINDEX( B.Content, A.Content ) > 0
WHERE B.Content IS NULL
SELECT A.Content
FROM ListA A LEFT OUTER JOIN ListB B
ON A.Content LIKE '%' + B.Content + '%'
WHERE B.Content IS NULL

John

"HumanJHawkins" <JH******@HumanitiesSoftware.Com> wrote in message
news:fi*****************@newsread2.news.pas.earthl ink.net...
Hi,

I am getting errors in the following... Is it even possible to join on
CONTAINS?

SELECT ListA.Content
FROM ListA LEFT OUTER JOIN ListB
ON CONTAINS(ListB.Content, ListA.Content)
WHERE ListB.Content IS NULL

Thanks!

Jul 20 '05 #4
I'm not sure if that would work. The reason I need to use CONTAINS (or an
equivalent) is that I need to do an inflectional search. I abbreviated the
code as much as possible for the group... Perhaps too much. What I really
need to join on is something like:

SELECT ListA.Content
FROM ListA LEFT OUTER JOIN ListB
ON CONTAINS(ListB.Content, FORMS OF(INFLECTIONAL, ListA.Content))
WHERE ListB.Content IS NULL

Any ideas?

Thanks!

"John Bell" <jb************@hotmail.com> wrote in message
news:Qf*********************@news-text.cableinet.net...
Hi

CONTAINS does not take a column as the second parameter, therefore you you
can't use it.

These may be an alternative:

SELECT A.Content
FROM ListA A LEFT OUTER JOIN ListB B
ON CHARINDEX( B.Content, A.Content ) > 0
WHERE B.Content IS NULL
SELECT A.Content
FROM ListA A LEFT OUTER JOIN ListB B
ON A.Content LIKE '%' + B.Content + '%'
WHERE B.Content IS NULL

John

"HumanJHawkins" <JH******@HumanitiesSoftware.Com> wrote in message
news:fi*****************@newsread2.news.pas.earthl ink.net...
Hi,

I am getting errors in the following... Is it even possible to join on
CONTAINS?

SELECT ListA.Content
FROM ListA LEFT OUTER JOIN ListB
ON CONTAINS(ListB.Content, ListA.Content)
WHERE ListB.Content IS NULL

Thanks!


Jul 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
3060
by: Xenophobe | last post by:
I know this isn't a MySQL forum, but my question is related to a PHP project. I have two tables. table1 table2 "table1" contains 2 columns, ID and FirstName:
0
1971
by: Stein Rustad | last post by:
I've run into a problem I cannot solve in SQL, hope some of you can help me. First of all, my constraints. I have to resolve all this in a single SQL statement, as it is to be passed on to another...
0
477
by: HumanJHawkins | last post by:
Hi, I am getting errors in the following... Is it even possible to join on CONTAINS? SELECT ListA.Content FROM ListA LEFT OUTER JOIN ListB ON CONTAINS(ListB.Content, ListA.Content) WHERE...
3
1674
by: jw56578 | last post by:
Which way of retrieving a record is more effecient?: Select tbl1.field1, tbl2.field1 from table1 tbl1 inner join table2 tbl2 on tbl1.id = tbl2.id where someid = somevalue and someid =...
4
21402
by: PASQUALE | last post by:
Hi I have a question: do the both statements below give the same result? If yes then does somebody know something about preformance differencies using these joins? SELECT A.* FROM Table1 A...
7
1696
by: Chris | last post by:
I'm using ASP.NET and SQL Server and this might be an obviuos question for most, but if I have a table that contains several fields that I need to relate to just one field in another table, how do...
2
1310
by: eurolinux | last post by:
I'm trying to left join a table where there are two identical fields I want to select all records in a field from the left table and only those records from the identical field of the right table...
52
6268
by: MP | last post by:
Hi trying to begin to learn database using vb6, ado/adox, mdb format, sql (not using access...just mdb format via ado) i need to group the values of multiple fields - get their possible...
1
1741
by: rando1000 | last post by:
I've got a query from SQL Server that I'm trying to carry over to Access. The Query uses 3 tables with two INNER JOINS, and each of the INNER JOINS has two operators, roughly like this: Select...
0
7134
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7014
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7180
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7229
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
4921
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4609
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3108
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1429
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
667
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.