troubleshooting Question

'FORMSOF(INFLECTIONAL,'+@text+')')...not working

Avatar of pbchhaya
pbchhaya asked on
Microsoft SQL ServerMicrosoft SQL Server 2005
6 Comments1 Solution1015 ViewsLast Modified:
Hello

I want to write stored procedure,which will use FormsOF Inflectional,

BUT I am getting error,actually I dont know how to pass parameter in the
Inflectional query.

here it goes....
USE [charlotte]
GO
/****** Object: StoredProcedure [dbo].[sp_AdvanceSearch] Script Date:
08/11/2008 12:46:20 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

ALTER PROCEDURE [dbo].[sp_AdvanceSearch]

@Text VARCHAR(300)

As
Begin
Set nocount on;

Select s.SystemElementID,DocumentID, SETitleText as "Title",ElementText as
"SearchElement"

FROM TextElement t,SystemElement s,TOCMap tp,TableOfContents tc

Where t.SystemElementID=s.SystemElementID AND Freetext(ElementText,'FORMSOF
(INFLECTIONAL,'+@Test+')') AND s.SystemElementID=tp.SystemElementID AND tp.
TableOfContentsID=tc.TableOfContentsID

END

If I am using '+' before and after @text,then also it is giving me error,

Please help,I have been trying to do this from long time.

Thank You
USE [charlotte]
GO
/****** Object: StoredProcedure [dbo].[sp_AdvanceSearch] Script Date:
08/11/2008 12:46:20 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
 
ALTER PROCEDURE [dbo].[sp_AdvanceSearch]
 
@Text VARCHAR(300)
 
As
Begin
Set nocount on;
 
Select s.SystemElementID,DocumentID, SETitleText as "Title",ElementText as
"SearchElement"
 
FROM TextElement t,SystemElement s,TOCMap tp,TableOfContents tc
 
Where t.SystemElementID=s.SystemElementID AND Freetext(ElementText,'FORMSOF
(INFLECTIONAL,'+@Test+')') AND s.SystemElementID=tp.SystemElementID AND tp.
TableOfContentsID=tc.TableOfContentsID
 
END
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 6 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros