Subject Re: [firebird-support] Re: Select based on a partial match
Author Daniel Rail
Hi,

At February 17, 2004, 09:35, Dixon Epperson wrote:
> Example
> SELECT * FROM SALESDETAIL s WHERE SUBSTR(s.SD_TAXCODE, 3,2)='CO'

> sd_taxcode might be 'IL '
> or it could be 'ILCO '
> or it could be 'ILCOCC'

> is SubStr the right idea here and how do you implement a UDF. I
> mean is it all ready there and you just need to link to it, or is it
> a piece of code you have to write. Can I do it in Delphi?

Here's a link that shows you how to create your own UDF in Delphi:
http://firebird.sourceforge.net/index.php?op=useful

To use it with your database, the information can be found in the
language reference guide by searching for the DDL command "DECLARE
EXTERNAL FUNCTION".

--
Best regards,
Daniel Rail
Senior System Engineer
ACCRA Group Inc. (www.accra.ca)
ACCRA Med Software Inc. (www.filopto.com)