Posted: Wed May 03, 2006 1:31 pm Post subject: Identify characters/alphabet in DB2
I have the following requirement
Code:
P1Code Acode PTYPCode
AB01 AB AH
AB01 A1 AS
AB01 A2 AK
AB01 ... ...
AB01 A5 AH
CD05 PP CE
CD05 P1 CF
CD05 ... ...
CD05 P5 CD
KK09 CH OE
KK09 C1 OE
KK09 ... ...
KK09 C5 OK
Now a new master row will be entered as
Code:
P1Code Acode PTYPCode
' ' HH PU
- master row is one for which P1 Code is spaces.
Now I will have to replicate the master row to each of the P1Code with the other fields being the same from the master row, but only the Acode is differing as, rows are inserted as
Code:
P1Code Acode PTYPCode
AB01 AB PU
CD05 PP PU
KK09 CH PU
In this case the total Acode value itself will change.
For example if the master row is
Code:
P1 Code A code PTYP Code
' ' H3 PU
Then the P1Code will have to be replicated as, rows are inserted as
Code:
P1Code Acode PTYPCode
AB01 A3 PU
CD05 P3 PU
KK09 C3 PU
In this case only the first letter of the ACode value will change, the second position which is a number will remain the same.
The question is, whether there is something in DB2 that allow me to check if the value of a particular field is alphabetic or a character. In this example the ACode has only 2 characters.
Just to make it more clear, I am looking for something in DB2 that will help me to identify whether the value of a particular field is a character. I might have to look for the position of the character also.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum