
January 5th, 2007, 01:27 PM
|
|
Contributing User
|
|
Join Date: Jan 2006
Location: Carlsbad, CA
|
|
Quote: | Originally Posted by studiomaxer Hi,
I've got a text blob field and in it im storing file paths. I have an sql statement with a WHERE that selects rows based on if a string matches the text blob field. The problem is, its returning the row if the string is Contained in the text blob, not if it is an exact match. any help would be great. It is working fine in my MySql clone of the db.
SELECT row FROM paths WHERE path = 'thepath/thisdirectory'
if the text blob contains any part of that string it returns a value. |
First, lets eliminate the obvious.
If you are only storing file paths, do you really need a BLOB field?
Can you change to a VARCHAR field?
If not, then you could compare the returned BLOB contents with the original string before accepting it.
You could also wrap the logic into a stored procedure if you want to minimize the network traffic.
Also, I did not think that using "=" for a BLOB field was supported in Firebird:
WHERE path = 'thepath/thisdirectory'
I thought you had to use CONTAINS.
Clive.
|