Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Database > SQL Language
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
SQL Language SQL Language discussions not specific to a particular RDBMS program or vendor.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Language section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 10th, 2004, 01:30 PM
Registered User
 
Join Date: Nov 2003
Location: Canton, OH, USA.
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Hadware Send a message via Yahoo to Hadware
Default Using FREETEXT

the sntax for using freetext is
FREETEXT ( { column | * } , 'freetext_string' )

I put together a test like:
SELECT description_of_problem
FROM servicerequests
WHERE FREETEXT(description_of_problem, @description)
and it worked fine

What I have a a text box in a search form that may or may not be used. I can use this syntax for that situation
ISNULL ( check_expression , replacement_value )

So I put this together (without freetext):
(part of a where clause)
and (sr.description_of_problem = isnull(@desc, sr.description_of_problem) or sr.description_of_problem is null)

I need to use FREETEXT so what I came up with in the integration looks like this, which seems logical to me:
and (FREETEXT(sr.description_of_problem, isnull(@description, sr.description_of_problem)) or sr.description_of_problem is null)

Problem is I can't get it to work right...
Incorrect syntax near isnull is what I get in query analyzer.

Can anyone help?
Thanks
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Enable Freetext in SQL2000 ankur_icfai SQL Server 2000 1 October 24th, 2006 03:23 PM



All times are GMT -4. The time now is 06:29 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.