Subject | Re: [firebird-support] Easy Question SQL |
---|---|
Author | Helen Borrie |
Post date | 2003-10-09T14:04:09Z |
At 03:14 PM 9/10/2003 +0200, you wrote:
You will need to install (declare and commit) the UDF function StrLen from
the ib_udf library:
DECLARE EXTERNAL FUNCTION strlen
CSTRING(32767)
RETURNS INTEGER BY VALUE
ENTRY_POINT 'IB_UDF_strlen' MODULE_NAME 'ib_udf';
Then, your SQL will be
select * from tablename where feld2 is not null and strlen(feld2) > 250
(Pretty sure you need the not null test to avoid sending null to the function).
h.
>Hello,Hmm, it's not all that easy! <g>
>
>
>I have a database with one table, one field. Field is a varchar 255.
>
>I now want every entry with a length over 250, but:
>
>Select * from tablename where length(feld2) > 250
>
>isn't working.
>
>Same with:
>
>Select * from tablename where character_length(feld2) > 250
>
>So,
>
>how can i get with a sql every entry with more then 250 characters....
>
>Thanks a lot and
You will need to install (declare and commit) the UDF function StrLen from
the ib_udf library:
DECLARE EXTERNAL FUNCTION strlen
CSTRING(32767)
RETURNS INTEGER BY VALUE
ENTRY_POINT 'IB_UDF_strlen' MODULE_NAME 'ib_udf';
Then, your SQL will be
select * from tablename where feld2 is not null and strlen(feld2) > 250
(Pretty sure you need the not null test to avoid sending null to the function).
h.