Subject | Re: [firebird-support] how to suppress dashes in query results |
---|---|
Author | Virna Constantin |
Post date | 2016-02-12T03:31:10Z |
SELECT * WHERE REPLACE(UsersField,'-') = 'MyValue'
On Friday, February 12, 2016 3:57 AM, "homer@... [firebird-support]" <firebird-support@yahoogroups.com> wrote:
Users can enter values with dashes (-) in random locations. I don't know where they might put them. I need to select a record using a where clause that doesn't have those dashes. For example, the user might record an insurance policy number as 12-345678-01 or 123-456-789-01. All I will know are the number, and not where they put the dashes. Is there a way to suppress the dashes in the Select Clause, or the Where Clause? This is being done in a Delphi 2007 program using IBDAC.
It would be nice if I could do something like ... SELECT * WHERE HIDE('-',UsersField) = 'MyValue'
Or the equivalent in the Select statement.