Teradata 字符串操作
我仔细查看了 Teradata 语法参考,但无济于事
我有一些带有数字的行:
ID
Mickey
Laura9
Larry59N
如何从行中取出整数?
我明白 SUBSTR(id, 0, index( id, '%FORMAT%')) 可以,但我不知道我可以在 %FORMAT% 区域中输入什么来查找整数。
I have taken a good look at the Teradata Syntax reference to no avail
I have some rows with numbers:
ID
Mickey
Laura9
Larry59N
How do I take away the integers from my rows?
I understand that SUBSTR(id, 0, index(id, '%FORMAT%')) would work, but I don't know what could I enter in the %FORMAT% area to just find integers.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以使用 oTranslate 删除数字:
HTH。
干杯。
You can use oTranslate to remove numbers:
HTH.
Cheers.
不幸的是,我不相信 Teradata 本身有一个函数可以完成此任务。我建议查看 Teradata Developer Exchange 上发布的 UDF (链接)。函数
eReplaceChar
特别看起来可以帮助您完成您想要使用此数据执行的操作。在上面的链接中找到的 UDF 是在 Apache 2.0 许可证下发布的,因此您在使用它们时应该不会遇到任何问题。Unfortunately, I don't believe there is a function native to Teradata that will accomplish this. I would suggest looking at the UDF's posted on the Teradata Developer Exchange (link). The function
eReplaceChar
in particular looks like it may help you accomplish what you are looking to do with this data. The UDF's found at the link above were published under the Apache 2.0 license so you should not have any problems using them.