This is the first table:
Line_Card |
---|
0-17 |
0-10 |
1-1 |
0-11 |
1-1-17 |
1-1-10 |
1-1-13 |
1-1-6 |
1-1-21 |
This is the second table:
Port |
---|
0-13-37 |
1-1-2-40 |
0-8-29 |
1-1-4-12 |
1-1-2-14 |
0-1-30 |
0-17-25 |
1-1-17-62 |
1-1-1-55 |
The below query is supposed to read from the product of the joined tables:
SELECT Line_Card, Port
FROM Table_1
LEFT JOIN Table_2 ON
Table_1.Column= Table_2.Column
AND Table_1.Port ~~ LIKE_ESCAPE((Table_2.Line_Card || '-%'),'\')
AND Table_1.Port !~~ LIKE_ESCAPE((Table_2.Line_card || '-%-%'),'\');
However, it shows an invalid SQL character error on oracle. It would be greatly appreciated if someone could also give me the equivalent of this statement or the infinity symbol in Teradata.