473,399 Members | 4,177 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

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 16944
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
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
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
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
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
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
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
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
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
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
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...

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.