Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

length function in Interbase ?

1,428 views
Skip to first unread message

genc ymeri

unread,
Oct 3, 2003, 8:54:50 AM10/3/03
to
Is any length function Interbase ?

I just want to to this very simple command:

select count(*) from MyTable where length(LastName) = 7 ?

Thank You in advance.


Thomas Steinmaurer

unread,
Oct 3, 2003, 8:57:42 AM10/3/03
to
"genc ymeri" <genc_...@hotmail.com> schrieb im Newsbeitrag
news:3f7d...@newsgroups.borland.com...

> Is any length function Interbase ?
>
> I just want to to this very simple command:
>
> select count(*) from MyTable where length(LastName) = 7 ?

There isn't a built-in function, but you can use the UDF "strlen"
function in the ib_udf UDF library, which comes with each
InterBase installation. Check out the documentation how to
declare and use UDFs.


HTH,
Thomas Steinmaurer

The IB LogManager Product Family
Logging/Auditing Suite for InterBase and Firebird
http://www.iblogmanager.com


Bill Todd

unread,
Oct 3, 2003, 10:46:24 AM10/3/03
to
SELECT COUNT(*) FROM MYTABLE
WHERE LASTNAME LIKE '_______'

(That is 7 underscores.)


--
Bill (TeamB)
(TeamB cannot respond to questions received via email)

genc ymeri

unread,
Oct 3, 2003, 12:11:33 PM10/3/03
to
Ha, ha, ha, ha, That's cool. I should have done before,,,,,

MSSQL has tought us to be so lazy I guess :) :) :)

Thanks

"Bill Todd" <n...@no.com> wrote in message
news:2s2rnvgmlobtpg7sb...@4ax.com...

Roman Yaroshenko

unread,
Oct 23, 2003, 1:11:03 AM10/23/03
to
> Is any length function Interbase ?
>
> I just want to to this very simple command:
>
> select count(*) from MyTable where length(LastName) = 7 ?
>

DECLARE EXTERNAL FUNCTION strlen
CSTRING(32767)
RETURNS INTEGER BY VALUE
ENTRY_POINT 'IB_UDF_strlen' MODULE_NAME 'ib_udf';

ib_udf -> "c:\program files\borland\interbase\udf\ib_udf.dll"
scripts -> "c:\program files\borland\interbase\examples\udf\ib_udf.sql"

What's problem?


0 new messages