Quantcast
Channel: Teradata Forums - Database
Viewing all articles
Browse latest Browse all 14773

A question concerning LIKE - forum topic by GwenaelLeBarzic

$
0
0

Hello everyone !
 
I create this topic because I have a question here.
I have two tables T1 and T2.
The field which is the primary key of T1 is PK1.
The field which is the primary key of T2 is PK2.
PK2 is in fact PK1 with a suffix after, something like "-1".
 
I wanted to know how could I perform a link between T1 and T2.
I tried this :

SELECT *

FROM T1, T2

WHERE PK2 LIKE PK1 || '%'

But it does not work.
I was wondering how it was possible to handle this situation. I thought about an "explode" function or a "split" function based on the "-" character, but I cannot find if they exist or not in Teradata.
 
May you help me on this topic, please ?
 
Best regards.
 
Gwenael Le Barzic

Forums: 

Viewing all articles
Browse latest Browse all 14773

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>