Subject | Re: [firebird-support] How to substitute field value |
---|---|
Author | Pavel Menshchikov |
Post date | 2005-03-23T18:29:13Z |
Hello,
j> Once I found somewhere that there is convenient way to substitute
j> field values. For example I have field with walues:
j> 1
j> 2
j> 3
j> 4
j> 5
j> but in my select result I want to see
j> a
j> b
j> c
j> d
j> e
j> So I want to change 1->a, 2->b ...
j> How to do it?
And what do you want to be after 26->z?
You may use a UDF to covert integer that represent character code to a
corresponding character, something like
chr(YourNumber+Displacement_To_a-1).
May be standard FB UDFs include such functiion - I don't remember,
look in UDF/*.sql files.
HTH
--
Best regards,
Pavel Menshchikov
http://www.ls-software.com
j> Once I found somewhere that there is convenient way to substitute
j> field values. For example I have field with walues:
j> 1
j> 2
j> 3
j> 4
j> 5
j> but in my select result I want to see
j> a
j> b
j> c
j> d
j> e
j> So I want to change 1->a, 2->b ...
j> How to do it?
And what do you want to be after 26->z?
You may use a UDF to covert integer that represent character code to a
corresponding character, something like
chr(YourNumber+Displacement_To_a-1).
May be standard FB UDFs include such functiion - I don't remember,
look in UDF/*.sql files.
HTH
--
Best regards,
Pavel Menshchikov
http://www.ls-software.com