I need the value extracted from between the 5th and 6th comma of a string. STRTOK() is skipping the positions that are empty and not counting them. For example, this returns null because there are not 6 instances of values between commas:
SELECT STRTOK('1,,,,,012345678,abcdzyz,,,,,,', ',', 6) AS extracted_value;
I have tried the popular AI sites and none of the solutions are working. Can this be done in Teradata, or should I do it in python?