Subject RE: [firebird-support] special string question
Author Leyne, Sean
Olaf,

> Always yes. I would create files for the data medium exchange procedure
> dtaus-files (bank transactions) and only some characters are allowed. All
> possible chars are saved in my table with translation upper and so on. Now I
> would like to check each character. At the time I have create a stored
> prozedure with input my string and output the changed one.
>
> for int i =1 to char length
> substring ...
> select from table
> set to new string - add
> i++
>
> is it the best way?

I am inclined to say no.

I would see if I could use a UDF (or several) which would perform the character swaps/case conversion.

A UDF would have a specific character mapping, but if you needed to support a new character/mapping, you could update the UDF and deploy same.

A UDF would execute *much* faster than the SP logic described.


Sean