I am using a Informix database.
I have a concatenated case number,data type of a string (S-0100-CR-20010101) that I am trying to parse into four different fields that will link to another table where the case number already separated into four fields (S string(4),0100 integer, CR string(6),20010101 integer).
How do you write the sql so that the 2nd and 4th field data have an integer data type.
This is my query:
SELECT
SUBSTR(case_num,1,1) cs_num_1,
SUBSTR(case_num,3,4) cs_num_2,
SUBSTR(case_num,8,2) cs_num_3,
SUBSTR(case_num,11,11) cs_num_4,
prty_type,
prty_num
FROM fr_qual
Thank you in advance for your help! =o)
I have a concatenated case number,data type of a string (S-0100-CR-20010101) that I am trying to parse into four different fields that will link to another table where the case number already separated into four fields (S string(4),0100 integer, CR string(6),20010101 integer).
How do you write the sql so that the 2nd and 4th field data have an integer data type.
This is my query:
SELECT
SUBSTR(case_num,1,1) cs_num_1,
SUBSTR(case_num,3,4) cs_num_2,
SUBSTR(case_num,8,2) cs_num_3,
SUBSTR(case_num,11,11) cs_num_4,
prty_type,
prty_num
FROM fr_qual
Thank you in advance for your help! =o)