Subject Re: [firebird-support] String function - convert to 'Nice' address format ??
Author Helen Borrie
At 11:29 AM 15/12/2007, you wrote:
>.... follow up.
>Is there any problem with declaring a function TWICE... with different
>names ??

No, none at all.

>To pretty up my SQL, I'd like not to use F_PROPERCASE(CITY)... but
>rather something like CS(CITY)
>Seems to work ok, but I just wanted to see if I'm playing with fire ! I
>need all the FireBird Karma available !
>Thanks
>rich
>
>> DECLARE EXTERNAL FUNCTION cs
>> CSTRING(32760)
>> RETURNS CSTRING(32760) FREE_IT
>> ENTRY_POINT 'propercase' MODULE_NAME 'FreeAdhocUDF';

Although I can't see the point of the above, given that I've never heard of a city name that was 32 Kb long, you can use multiple declarations (with different EXTERNAL FUNCTION identifiers) to give yourself various "versions" with different argument sizes. So, e.g., if CITY is a varchar(40), you can have a declaration for this UDF that takes a cstring of 42 bytes...

./hb