473,387 Members | 1,528 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,387 software developers and data experts.

Query Help: JOIN ON CONTAINS with FORMSOF

Hi,

I have been able to JOIN ON CONTAINS(column, 'whatever'), but can't seem to
get the syntax right to join on one field containing a related field.

The query below is what I am working with... As written, everything inside
the single quotes is interpreted as a literal string. I.e. "FormsOf" doesn't
act as a function, but just a bunch of letters. Any ideas?

Thanks!

SELECT 'Dolch' AS[List Name], dbo.Dolch.vchWord
FROM dbo.Dolch LEFT OUTER JOIN
dbo.CombinedLexicons ON
CONTAINS(dbo.Dolch.vchWord, 'FORMSOF(INFLECTIONAL,
dbo.CombinedLexicons.vchWord)')
WHERE (dbo.CombinedLexicons.vchWord IS NULL)



Jul 20 '05 #1
1 1919
Jeffrey A. Hawkins (Sp******@Sorry.ALL) writes:
I have been able to JOIN ON CONTAINS(column, 'whatever'), but can't seem
to get the syntax right to join on one field containing a related field.

The query below is what I am working with... As written, everything
inside the single quotes is interpreted as a literal string. I.e.
"FormsOf" doesn't act as a function, but just a bunch of letters. Any
ideas?

Thanks!

SELECT 'Dolch' AS[List Name], dbo.Dolch.vchWord
FROM dbo.Dolch LEFT OUTER JOIN
dbo.CombinedLexicons ON
CONTAINS(dbo.Dolch.vchWord, 'FORMSOF(INFLECTIONAL,
dbo.CombinedLexicons.vchWord)')
WHERE (dbo.CombinedLexicons.vchWord IS NULL)


I don't use full-text myself, so you may get a better answer in
microsoft.public.sqlserver.fulltext. I played with:

SELECT 'Dolch' AS[List Name], dbo.Dolch.vchWord
FROM dbo.Dolch LEFT OUTER JOIN
dbo.CombinedLexicons ON
CONTAINS(dbo.Dolch.vchWord, 'FORMSOF(INFLECTIONAL, ' +
dbo.CombinedLexicons.vchWord + ')')
WHERE (dbo.CombinedLexicons.vchWord IS NULL)

But this gives me a syntax error.

So that, and what I can read out from Books Online about CONTAINS is
that you cannot use CONTAINS for a join. Since fulltext is an engine
external to SQL Server, it kind of make sense. The workaround would be
ro tun a cursor.

--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 20 '05 #2

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:
1
by: Lumpierbritches | last post by:
I'm trying to pull all the parents of a particular animal and I have my SQL statement that says not supported and when I attempt to run the Query, I get The SQL statement couldn't be executed...
4
by: Andrew | last post by:
I am a newbie to C# and would appreciate any help converting the following javascript function to C# function fxnParseIt() { // Note: sInputString code for demo purposes only, and should be // ...
0
by: Andrew | last post by:
I am a newbie to C# and would appreciate any help converting the following javascript function to C# Algorithm Replace all double quotes (clears the text and any improper quotations) If...
2
by: schoultzy | last post by:
Hello Everyone, This is probably a simple fix so be kind when/if you reply. The query below retrieves information for individuals based on a column named ATTRIB_DEF, and assorted other columns;...
2
by: Thomas | last post by:
Hi All. I think that if I explain the database layout first it may be easier to ask my question. Table Name Field Name Test TestCode Description SpecimenRequirements FeeSchedule TestCode...
0
by: Casey | last post by:
I am really having trouble with a full-text search query. Here's what I've got: SELECT listing_id, RANK, name, address, city, zip, heading, phone FROM listings a, FREETEXTTABLE(listings, *,...
3
by: garrettm | last post by:
What if you want to search using FTS with AND logic using the FORMSOF(inflectional,...) inside the CONTAINS() clause??? if my search phrase is "light hearted" I can easily do an OR search using...
15
by: shapper | last post by:
Hello, I have two Lists: A = {ID, Name} = { (Null, John), (Null, Mary), (Null, Andrew), (Null, Peter) } B = {ID, Name} = { (1, John), (2, Robert), (3, Angela), (4, Andrew) } I want to...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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,...

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.