Subject RE: [IBO] Firebird newbie
Author Norman Dunbar
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
addressees of its existence or contents. If you have received this email
and are not a named addressee, please delete it and notify the Lynx
Financial Systems IT Department on 0113 2892990.