Subject | RE: [firebird-support] Alltrim UDF in FB 2.5 |
---|---|
Author | Svein Erling Tysvær |
Post date | 2011-03-29T09:56:45Z |
What about trim(coalesce(partno_prefix, ''))
HTH,
Set
-----Original Message-----
From: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com] On Behalf Of Alan J Davies
Sent: 29. mars 2011 10:58
To: firebird-support@yahoogroups.com
Subject: [firebird-support] Alltrim UDF in FB 2.5
Hi, I'm trying out 2.5.0.26074 against existing 2.1.3.18185 databases.
Clean install on XP
This code in 2.5 gives error "Connection was lost to database:"
(Crashes - I can then restore connections with no problem.)
select
'*'||alltrim(partno_prefix)||alltrim(Partno)||alltrim(partno_suffix)||'*' from
part_table
It works perfectly in 2.1
Its used to generate barcodes, hence the * and the need to use alltrim.
Trim does not work because if there is no partno_prefix or partno_suffix
it gives a null result as the concatenation.
I recall seeing some information about certain Udfs now being native in
Firebird, but can't remember where or when, and I've checked my own
documentation.
The Alltrim udf is part of fudlib.dll.
Can anyone point me in the right direction, please.
Regards
Alan J Davies
Aldis
------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Visit http://www.firebirdsql.org and click the Resources item
on the main (top) menu. Try Knowledgebase and FAQ links !
Also search the knowledgebases at http://www.ibphoenix.com
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Yahoo! Groups Links
HTH,
Set
-----Original Message-----
From: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com] On Behalf Of Alan J Davies
Sent: 29. mars 2011 10:58
To: firebird-support@yahoogroups.com
Subject: [firebird-support] Alltrim UDF in FB 2.5
Hi, I'm trying out 2.5.0.26074 against existing 2.1.3.18185 databases.
Clean install on XP
This code in 2.5 gives error "Connection was lost to database:"
(Crashes - I can then restore connections with no problem.)
select
'*'||alltrim(partno_prefix)||alltrim(Partno)||alltrim(partno_suffix)||'*' from
part_table
It works perfectly in 2.1
Its used to generate barcodes, hence the * and the need to use alltrim.
Trim does not work because if there is no partno_prefix or partno_suffix
it gives a null result as the concatenation.
I recall seeing some information about certain Udfs now being native in
Firebird, but can't remember where or when, and I've checked my own
documentation.
The Alltrim udf is part of fudlib.dll.
Can anyone point me in the right direction, please.
Regards
Alan J Davies
Aldis
------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Visit http://www.firebirdsql.org and click the Resources item
on the main (top) menu. Try Knowledgebase and FAQ links !
Also search the knowledgebases at http://www.ibphoenix.com
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Yahoo! Groups Links