我有一个列名ip_addr,其中包含有效IP和无效IP。我希望仅在Teradata中对有效的IP地址进行子集化。现在我使用以下内容但它似乎不起作用:
EXECUTE
(
create multiset volatile table base as
(
select distinct int_cust_ip_addr as ip_addr
from cm11_jan14
where int_cust_ip_addr like '%.%.%.%'
)
WITH DATA PRIMARY INDEX(ip_addr)
ON COMMIT PRESERVE ROWS
)
BY TERADATA;
答案 0 :(得分:2)
TD14 +支持正则表达式,对于正确的IP4地址,返回 1 :
SELECT events.event_id,events.tournament, events.team, events.team2,
events.event_date, events.venue, pick.picks,picks.tournament
FROM events
INNER JOIN picks ON `event_id`.events = `event_id`.picks
WHERE tournament = 'SUPER15'
对于IP6,只需搜索“regex ip6”