Subject RE: [IBO] Firebird newbie
Author Stephen Lee-Woolf
Thanks Norman. Some of this stuff looks pretty good!

Steve

In article
<97AAB2A0983A7144BF02E9A191C9C82054558F@...>,
norman.dunbar@... says...
> Hi Stephen,
>
> it looks like you need to add the Firebird UDF dll to your system to add the
> SUBSTR function. As follows :
>
> Make sure that in your <firebird install folder>\UDF the file ib_udf.dll
> exists. If so, you're almost there.
>
>
> Connect to your database and as sysdba run the following :
>
> DECLARE EXTERNAL FUNCTION substr
> CSTRING(80), SMALLINT, SMALLINT
> RETURNS CSTRING(80) FREE_IT
> ENTRY_POINT 'IB_UDF_substr' MODULE_NAME 'ib_udf';
>
>
> That declares that an external User Defined Function is in use, that it
> lives in ib_udf.dll (which is found in the UDF folder below the firebird
> one, and that the entry point for the function is IB_UDF_substr.
>
> Now all you have to do is use it :
>
> SELECT count(*) AS SL
> FROM logins
> WHERE server=DefaultServer AND
> substr(login, 1, 10) = :Search1 AND
> substr(login, 1, 10) = substr(logout, 1, 10) AND
> acctype='S';
>
>
>
> HTH
>
> Regards,
> Norman
>
> -------------------------------------
> Norman Dunbar
> Database/Unix administrator
> Lynx Financial Systems Ltd.
> mailto:Norman.Dunbar@...
> Tel: 0113 289 6265
> Fax: 0113 289 3146
> URL: http://www.Lynx-FS.com
> -------------------------------------
> This email is intended only for the use of the addressees named above and
> may be confidential or legally privileged. If you are not an addressee you
> must not read it and must not use any information contained in it, nor copy
> it, nor inform any person other than Lynx Financial Systems or the

--
Steve Lee-Woolf
University of Salford
Manchester, U.K.