Need a function in Teradata which accepts a string and returns a integer list

General

Need a function in Teradata which accepts a string and returns a integer list

HI All - 

I need a User defined function in teradata which will accept a string like "333,1234,2345,1266,8765"

and return a table with one column having  values:

333

1234

2345

1266

8765

, please help me with this function.

3 REPLIES
Junior Contributor

Re: Need a function in Teradata which accepts a string and returns a integer list

Which TD release is running on your system?

In TD14 there's a built-in STRTOK_SPLIT_TO_TABLE...

Dieter

Enthusiast

Re: Need a function in Teradata which accepts a string and returns a integer list

Try using a recusive SQL

Enthusiast

Re: Need a function in Teradata which accepts a string and returns a integer list

Following link should address your problem using recursive SQL if you can tune the query with the separator used in your string

http://forums.teradata.com/forum/database/help-in-recursive-query-required#comment-23532