Not defined error

Database
Enthusiast

Not defined error

 

 

 

i try to convert this source code:

 

 

select Segments=@Segments_Split

into #Segments

SELECT Split.a.value('.', 'VARCHAR(100)') AS Segment

into #Segments_Split

FROM (SELECT CAST ('<M>' + REPLACE(Segments, ',', '</M><M>') + '</M>' AS XML) AS String

FROM #Segments )AS A CROSS APPLY String.nodes ('/M') AS Split(a)

 

and i got this teradata code:

it's works two weeks before and now not - how it could be???

 

CREATE MULTISET VOLATILE TABLE tt_Segments

 

(id integer, Segments varchar(256) character set unicode ) ON COMMIT PRESERVE ROWS;

select * from tt_Segments;

 

 

 CREATE MULTISET VOLATILE TABLE tt_Segments_Split AS  (SELECT d.*

 

FROM TABLE

 

(strtok_split_to_table

 

(tt_Segments.id, tt_Segments.Segments, ',/')

 

RETURNS

 

(outkey integer, tokennum integer, Segments varchar(20)character set unicode)

 

) as d )WITH DATA PRIMARY INDEX (Segments)ON COMMIT PRESERVE ROWS;

2 REPLIES
Junior Contributor

Re: Not defined error

I tried running it using SQL Assistant 16.00.0.2 and it refused to submit it with a Query is invalid error.

But a different Select based on STRTOK_SPLIT_TO_TABLE succeeded, this is a strange bug. 

 

Upgrading to SQL Assistant 16.00.0.3 fixed the problem :)

Enthusiast

Re: Not defined error

Ecxactly!

 

Tnx!