All Forums Aster
naresh01 1 post Joined 07/16
01 Aug 2016
Alternative to Strtok in Teradata Aster

Hi Team - i have a string field with about 600,000 rows like the below. Aster data base is connected through Teradata Studio.
Text1,Text2,Text3
Text1,Text2
Text1,Text2,Text3,Text4,Text5
I need each date in a different column, i tried strtok but Teradata studio gives me an error that it does not support strtok. Can anyone please help. thank you.

Tags:
dnoeth 4628 posts Joined 11/04
02 Aug 2016

As long as there's only a single character delimiter you can get a similar result using split_part('Text1,Text2,Text3,Text4,Text5',',',1) 
Caution: multiple consecutive delimiters will be treated as one in Teradata, but not in Aster, e.g. split_part('Text1,,Text2,Text3,Text4,Text5',',',2) returns 'Text2' in Teradata but '' in Aster.

Dieter

zakyw 11 posts Joined 07/16
10 Aug 2016

Hy Dieter
i want to ask you something about error in aster 
i've a problem with the query extract load from teradata to aster , but any something wrong with this query , 
-- query for example : 
INSERT INTO SB7.ASP_OVERCHARGE_SUBS
SELECT * FROM load_from_teradata (ON mr_driver
     tdpid('edw2')USERNAME('anggis')PASSWORD('Marvel93')
     QUERY ('SELECT DISTINCT SUBSCRIBER_NO, MSISDN_SUBS from XL_DATA_POSTPAID.ASP_OVERCHARGE_ANALYSIS')
)
 
but the error is 'mailman setup' so, please help to fix about this problem ya guys ?
 
thanks a lot 

You must sign in to leave a comment.