The following query works perfectly (returning all words on a list called
"Dolch" that do not contain a form of "doing"):
SELECT 'Dolch' AS[List Name], dbo.Dolch.vchWo rd
FROM dbo.Dolch LEFT OUTER JOIN
dbo.CombinedLex icons ON CONTAINS(dbo.Do lch.vchWord,
'FORMSOF(INFLEC TIONAL, "doing")')
WHERE (dbo.CombinedLe xicons.vchWord IS NULL)
However, what I really want to do requires me to piece two strings together,
resulting in a word like "doing". Any time I try to concatinate strings to
get this parameter, I get an error.
For example:
SELECT 'Dolch' AS[List Name], dbo.Dolch.vchWo rd
FROM dbo.Dolch LEFT OUTER JOIN
dbo.CombinedLex icons ON CONTAINS(dbo.Do lch.vchWord,
'FORMSOF(INFLEC TIONAL, "do' + 'ing")')
WHERE (dbo.CombinedLe xicons.vchWord IS NULL)
I have also tried using & (as in "do' & 'ing") and various forms of single
and double quotes. Does anyone know a combination that will work?
FYI, in case this query looks goofy because of the unused "CombinedLexico ns"
table, it is because the end result should be a working form of the
following...
Figuring out the string concatination is just a step toward this goal:
SELECT 'Dolch' AS[List Name], dbo.Dolch.vchWo rd
FROM dbo.Dolch LEFT OUTER JOIN
dbo.CombinedLex icons ON CONTAINS(dbo.Do lch.vchWord,
'FORMSOF(INFLEC TIONAL, ' + dbo.CombinedLex icons.vchWord + ')')
WHERE (dbo.CombinedLe xicons.vchWord IS NULL)
Thanks! 2 4334
Would this work for you?
declare @string varchar(2000)
declare @searchphrase varchar(200)
set @searchphrase=' do ing'
set @string='SELECT [Dolch] AS[List Name], dbo.Dolch.vchWo rd '
select @string=@string + ' FROM dbo.Dolch LEFT OUTER JOIN'
select @string=@string + ' dbo.CombinedLex icons ON
CONTAINS(dbo.Do lch.vchWord,''F ORMSOF(INFLECTI ONAL, '
select @string=@string +replace(@searc hphrase,' ','')
select @string=@string +')'' WHERE (dbo.CombinedLe xicons.vchWord IS NULL)'
print @string
--
Hilary Cotter
Looking for a SQL Server replication book? http://www.nwsu.com/0974973602.html
"HumanJHawk ins" <No****@NoSpam. Net> wrote in message
news:ZG******** *********@newsr ead1.news.pas.e arthlink.net... The following query works perfectly (returning all words on a list called "Dolch" that do not contain a form of "doing"):
SELECT 'Dolch' AS[List Name], dbo.Dolch.vchWo rd FROM dbo.Dolch LEFT OUTER JOIN dbo.CombinedLex icons ON CONTAINS(dbo.Do lch.vchWord, 'FORMSOF(INFLEC TIONAL, "doing")') WHERE (dbo.CombinedLe xicons.vchWord IS NULL)
However, what I really want to do requires me to piece two strings
together, resulting in a word like "doing". Any time I try to concatinate strings to get this parameter, I get an error.
For example:
SELECT 'Dolch' AS[List Name], dbo.Dolch.vchWo rd FROM dbo.Dolch LEFT OUTER JOIN dbo.CombinedLex icons ON CONTAINS(dbo.Do lch.vchWord, 'FORMSOF(INFLEC TIONAL, "do' + 'ing")') WHERE (dbo.CombinedLe xicons.vchWord IS NULL)
I have also tried using & (as in "do' & 'ing") and various forms of single and double quotes. Does anyone know a combination that will work?
FYI, in case this query looks goofy because of the unused
"CombinedLexico ns" table, it is because the end result should be a working form of the following... Figuring out the string concatination is just a step toward this goal:
SELECT 'Dolch' AS[List Name], dbo.Dolch.vchWo rd FROM dbo.Dolch LEFT OUTER JOIN dbo.CombinedLex icons ON CONTAINS(dbo.Do lch.vchWord, 'FORMSOF(INFLEC TIONAL, ' + dbo.CombinedLex icons.vchWord + ')') WHERE (dbo.CombinedLe xicons.vchWord IS NULL)
Thanks!
"Hilary Cotter" <hi***********@ gmail.com> wrote in message
news:Or******** ******@TK2MSFTN GP09.phx.gbl... Would this work for you? declare @string varchar(2000) declare @searchphrase varchar(200) set @searchphrase=' do ing' set @string='SELECT [Dolch] AS[List Name], dbo.Dolch.vchWo rd ' select @string=@string + ' FROM dbo.Dolch LEFT OUTER JOIN' select @string=@string + ' dbo.CombinedLex icons ON CONTAINS(dbo.Do lch.vchWord,''F ORMSOF(INFLECTI ONAL, ' select @string=@string +replace(@searc hphrase,' ','') select @string=@string +')'' WHERE (dbo.CombinedLe xicons.vchWord IS NULL)' print @string
It's taking me a while to see if this will work. Thanks for the suggestion.
It looks like a good path to take. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Lars Tackmann |
last post by:
Hi - I need a function to concatenate a variable number of strings.
I have two ideas but cannot deside which way to go.
1) use the "stdarg" macros - if i use these macros it will be easy
to step through the strings, but as I see it (and I may be wrong here)I
need to pass the number of strings to the function - which is difficult in
this...
|
by: james_oinn |
last post by:
We have 2 SQL Server 2005 machines. One has the CTP version installed,
the other is the RTM.
When running the query below, results are returned for the CTP version
but not the RTM version.
select * from table t1
inner join containstable(table, column, 'formsof(inflectional,
''bücher'')') t2
on t1. = t2.
|
by: Casey |
last post by:
This does not seem to work:
CREATE Procedure getSearchResults2
(
@search nvarchar(4000)
)
as
SELECT listing_id, RANK, name, address, city, zip, heading, phone
FROM listings a,
FREETEXTTABLE(listings, *, 'FormsOf(INFLECTIONAL, @search') b
|
by: metamorphiq |
last post by:
Hello,
I'm a Java programmer, so I'm probably asking a very simple question
here, but I have trouble solving it :)
I'd like to know how you concatenate multiple (4, in my case) char* in
C++, and have the result as a char*.
I first tried using strcat, but you need a const char* as the second
parameter to work, but I don't know all the...
|
by: jerrycan |
last post by:
Hi All
I have the following SQL script:
ALTER procedure FREESEARCH1
@SVALUE as nvarchar(255)
as
declare @rc int
if @SVALUE like '*' exec dbo.ALLREQ else
Select * from Requirements where
| |
by: jeffbroodwar |
last post by:
Hi,
I want to concatenate 0x with a variable (dont know what type) to pass it in a byte array. the code below shows the original code :
ORIGINAL CODE :
ioData = new byte;
ioData = (byte)0xAA;
|
by: Aaron Hoffman |
last post by:
Hello,
I'm hoping someone might be able to offer some guidance to my problem.
I have one query in MS Access which consists of 2 tables joined by a
SEQUENCE_ID. By joining the two tables I am able to produce a query
that gives me two fields, Part_Number and Product_Type. Below you can
see some sample data:
Part_Number Product_Type...
|
by: HumanJHawkins |
last post by:
Hi all,
I need something stronger than LIKE or CONTAINS, but not so
comprehensive as the FORMSOF(Field, INFLECTIONAL).
I am looking to see which words from one list also exist in another.
However, this is related to reading comprehension. Therefore I need to
see "dog" and "dogs" as a match. However, I don't want to see "run"
and "ran" as...
|
by: dlite922 |
last post by:
All i want to do in C++ is pass a few arguments, concatenate them into variable and call system()
I've gotten this far:
#include <stdio.h>
#include <stdlib.h>
#include <string>
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
| |
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
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 then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
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 we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
| |