A follow-up... I tested the below SQL FTS query on both SP2 and SP3 and got
Syntax error occurred near 'weight'. Expected '_NOT, '(', _ISABOUT,
Microsoft.
"John Kane" <jt-kane@comcast.net> wrote in message
news:OL9sggd4DHA.2168@TK2MSFTNGP12.phx.gbl...
> Guru,
> No, "weight" has always been a part of SQL Full-text Search CONTAINS and
> ISABOUT and is not a new feature.
> When I ran the below query (a simplified version of your original query),
I
> got the same error as you did:
>
> select @@version -- Microsoft SQL Server 2000 - 8.00.760 (Intel X86)
> select * from pub_info where CONTAINS (*,'weight AND loss')
> Server: Msg 7631, Level 15, State 1, Line 2
> Syntax error occurred near 'weight'. Expected '_NOT, '(', _ISABOUT,
> _FORMSOF, _STRING, _PREFIX_STRING, '!''
> in search condition 'weight AND loss'.
>
> on SQL 2000 SP3 and while I have not yet tested this on SP2, I suspect
that
> it will succeed. So, something changed between SP2 and SP3, that allowed
> this error to be raised (incorrectly) in SP3.
>
> Once, I can confirm that it works correctly on SP2, I'll notify Microsoft
> and have them investigate this as a possible bug.
> Regards,
> John
>
>
>
> "Guru" <gmandavia@smartbrief.com> wrote in message
> news:bdc28426.0401230712.5f55f468@posting.google.com...
> > John,
> > After digging on the microsoft website for about 2 hours, here is
> > what I found
> >
> >
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_ca-co_2y2h.asp
> >
> > From what I understand, M$ added new features that allow weighted,
> > proximity and generation term searches. For these to work, they
> > added WEIGHT, NEAR, ISABOUT and other terms as reserved terms.
> >
> > I guess the only way to use WEIGHT is within "" which sounds more like
> > a bug than a feature to me. But hey, what do i know....
> >
> > thanks for you help,
> > guru
> >
> >
> > "John Kane" <jt-kane@comcast.net> wrote in message
> news:<OhUOwIR4DHA.2448@TK2MSFTNGP09.phx.gbl>...
> > > Guru,
> > > Most likely there was a fix or change in the code base between SP2
(534)
> and
> > > SP3 (760) that brought to light this bug and not the differences in
SQL
> > > Server editions. Adding double quotes around not specific keywords,
> "weight"
> > > in this case is just a workaround.
> > >
> > > What you really need to do is to call Microsoft PSS SQL Server support
> and
> > > open a support case and have them confirm this as a bug and if this is
> > > critical to your business, they can generate a hotfix for you that
will
> > > truly fix this bug. If you do call PSS SQL Server support be sure to
get
> the
> > > bug number and let us know how & when it will be fixed!
> > >
> > > Thanks,
> > > John
> > >
> > >
> > > "Guru" <gmandavia@smartbrief.com> wrote in message
> > > news:bdc28426.0401220530.6bdfcb34@posting.google.com...
> > > > John,
> > > > What i don't understand is why the word 'weight' fails on one
> > > > version and succeeds on the other?
> > > >
> > > > the output from select @@version
> > > > Microsoft SQL Server 2000 - 8.00.534 (Intel X86) Nov 19 2001
> > > > 13:23:50 Copyright (c) 1988-2000 Microsoft Corporation Standard
> > > > Edition on Windows NT 5.0 (Build 2195: Service Pack 4)
> > > > it succeeds here.
> > > >
> > > > ***********************
> > > > Microsoft SQL Server 2000 - 8.00.760 (Intel X86) Dec 17 2002
> > > > 14:22:05 Copyright (c) 1988-2003 Microsoft Corporation Enterprise
> > > > Edition on Windows NT 5.0 (Build 2195: Service Pack 4)
> > > > it fails here.
> > > > ****************
> > > >
> > > > it is inconvenient to add "" around words because this is an
automated
> > > > search page and a java method builds the query string. i woul have
to
> > > > write custom exception to add quotes around the word weight.
> > > >
> > > > thanks,
> > > > guru
> > > >
> > > >
> > > > "John Kane" <jt-kane@comcast.net> wrote in message
> > > news:<ecSDsdH4DHA.2608@TK2MSFTNGP09.phx.gbl>...
> > > > > Guru.
> > > > > This is most likely a bug as the word "weight" is a keyword within
> the
> > > SQL
> > > > > FTS predicates.
> > > > > What you need to do is add double quotes around your search words,
> for
> > > > > example using the pubs database table pub_info:
> > > > >
> > > > > select * from pub_info where CONTAINS (*,'"weight" AND "loss"')
> > > > >
> > > > > Also, could you post the full output of -- SELECT @@version -- as
> this
> > > > > would be helpful in understanding this issue.
> > > > > Thanks,
> > > > > John
> > > > >
> > > > >
> > > > >
> > > > > "Guru" <gmandavia@smartbrief.com> wrote in message
> > > > > news:bdc28426.0401210713.5497620b@posting.google.com...
> > > > > > Hi,
> > > > > > The query pasted below
> > > > > >
> > > > > > SELECT CAST(copy.copyid as VARCHAR(50)) as copyid
> > > > > > FROM copy,story,brief,link_copy_issue,brief_issue
> > > > > > WHERE CONTAINS (copy.*,' weight AND loss ')
> > > > > > AND brief.briefid = '96EE6D61-D70D-47B9-82C2-F1105A0A863C' AND
> > > > > > brief.briefid = brief_issue.briefid AND link_copy_issue.issueid
=
> > > > > > brief_issue.issueid AND link_copy_issue.copyid = copy.copyid AND
> > > > > > copy.storyid = story.storyid ORDER BY CONVERT(varchar(8),
> > > > > > brief_issue.delivery_date, 112) desc
> > > > > >
> > > > > > fails on sql-server enterprise edition with the error message:
> > > > > > Syntax error occurred near 'weight'. Expected '_NOT, '(',
> _ISABOUT,
> > > > > > _FORMSOF, _STRING, _PREFIX_STRING, '!'' in search condition '
> weight
> > > > > > AND loss '.
> > > > > >
> > > > > > if i run the same query on sql-server Standard edition OR
replace
> the
> > > > > > word 'weight' the query works. any ideas why it would fail in
the
> > > > > > enterprise edition and not the standard edition? also, the word
> > > > > > weight is not included in the noise.eng file as one of the words
> to be
> > > > > > ignored. should i just add it to that list?
> > > > > >
> > > > > > any ideas would be appreciated.
> > > > > >
> > > > > > thanks,
> > > > > > guru
>
>