Subject Re: [firebird-support] Why won't this sql statement find record when it exists?
Author Ann Harrison
On Thu, May 10, 2012 at 4:45 PM, marsh.rolf <rmmarsh@...> wrote:

> SELECT * from tBooks where BookNbr = '20111122-001'
> BookNbr is defined as varchar (15), and the record does exist in the
> table. The user has populated this field with dashes in the field,
> sometimes multiple dashes, sometimes none.
> I removed the dash and changed the field in the table, and it found the
> record. Therefore, I think the problem is the dash in the "key" field.
> Is there a way to fix this?

As someone else mentioned, there are a variety of different dashes. I
suspect that the binary value of a dash varies depending on the character
set you're using. Are you absolutely sure that the output you copied and
pasted into the select query was in the same character set as the stored

Good luck,


[Non-text portions of this message have been removed]