If you use 'WHERE knowledge = '#search_string#, you will only get records
where knowledge matches the search string exactly.  If you use LIKE, you
will only get records where some part of knowledge matches the search string
exactly, i.e. 'Jane Doe' is contained in 'Jane Doe Peterson', but 'Jane Doe'
is not contained in 'Jane B. Doe'.  In the case of "where synopsis =
'#search_string#'", does synopsis contain the word 'site' only, or is 'site'
only a part of the field content?       

-----Original Message-----
From: miles [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 12, 2000 1:23 PM
To: [EMAIL PROTECTED]
Subject: searches failing...help.


Hi,

Ive got myself a tiny problem...which should be a snap for
you folks that are more skilled than myself right now...

<CFQUERY Name="knowledge" DataSource="ccmast">
select id, entered_date, synopsis, knowledge
from nxsknow
where knowledge = '#search_string#'
order by entered_date desc
</CFQUERY>

this query will fail each and every time with the following
error.

[microsoft][ODBC SQL Server Driver][SQL Server]TEXT and IMAGE datatypes
may not be used in the WHERE or HAVING clause, except with the LIKE
predicate and the IS NULL predicate.

HOWEVER when I change the WHERE statement to the following...

where knowledge LIKE '#search_string#'

I get no results.  It doesn't matter what I enter as a variable.
I should get something back....shouldn't I ?

The somewhat annoying part about this is if I change the where
statement to the following

where id = '#search_string#'

and id is equal to some number...this query works...and pulls up a
single record...or if I change the where statement to

where synopsis = '#search_string#'

and synopsis is equal to "site".   It returns nothing....it should 
return something
because half the entries in this table half the word "site" in the 
field synopsis.

And before you think that there's nothing in the table...there is plenty
of data.  What's up with this query...why is this happening ?  Any
clues ?

Miles.
----------------------------------------------------------------------------
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to