sql - Obtain everything from string after last underscore in every string
问题描述
I am trying to extract everything from my list of strings after the last underscore, after MOB_
in big query.
See example below:
STRING:
Topshop_AW19_Pro_MOB_competitors(mid price point)custom_affinity
DESIRED OUTPUT:
competitors(mid price point)custom_affinity
解决方案
这似乎直截了当:
RIGHT(stuff, RIGHT_FIND(stuff, 'MOB_'))
有趣的文档似乎有一些错误:
https://cloud.google.com/dataprep/docs/html/RIGHT-Function_57344732
https://cloud.google.com/dataprep/docs/html/RIGHTFIND-Function_118228807
推荐阅读
- python - PySpark:在 n 个元素上做一个简单的滑动窗口并通过函数聚合
- javascript - chrome.identity.launchWebAuthFlow 不起作用,但 chrome.identity.getAuthToken 工作
- android - 如何在关闭活动后停止继续播放的媒体播放器
- azure - 使用具有相同 ADF 的现有管道以编程方式创建新的 ADF 管道
- reactjs - 如何使用 ansible 在 React 中访问环境变量
- elasticsearch - kibana 中的错误“在 camelCase 中期望插件“id”,但发现:apm_oss”
- xslt - 检查取决于 XSL 上的属性
- reactjs - 父组件更改道具时子组件不会重新渲染
- git - Git commit:解析为必要的格式
- c# - NET 框架的 C# 编译器、SDK 和 msbuild