how to create output rows equal to comma saparated values in column field

Database
Enthusiast

how to create output rows equal to comma saparated values in column field

Hi All,

I need your help in one scenario.

I have one table contain CMSL coulumn field which has set of values saparated by comma.

I need output rows equal to list of comma saparated values.

Table is as below

ID    CSML

1      12

2      34,45

3      43

4      85,98,78

output should be as below

ID   CSML

1      12

2      34

2      45

3      43

4      85

4      98

4      78

How to achieve this using teradata SQL query?

Please give me the suggestion.

Thanks,

Deepak

2 REPLIES
Junior Supporter

Re: how to create output rows equal to comma saparated values in column field

Hi

You may take a look at STRTOK_SPLIT_TO_TABLE().

HTH.

Cheers.

Carlos.

Enthusiast

Re: how to create output rows equal to comma saparated values in column field

Thanks Carlos.

STRTOK_SPLIT_TO_TABLE() worked for me.

Thanks,

Deepak