Using MID function with Workbench 3?
I need to extract the "Pushing or Pulling" expression from the string below:
Strain or Injury By: Pushing or Pulling
When I try to use the MID function, I know how to identify the text and the starting location, but I'm having trouble expressing how to dynamically capture the rest of the text following the colon. If I express an actual number, it triggers an error for any fields that don't have that many characters following the colon. If I leave the expression blank,
mid(AR_CAUSE_OF_INJURY,SEARCH(":",AR_CAUSE_OF_INJURY)+2,)
I appreciate any help!
Comments
-
In TSQL you could use CASE on the column to search for the strings Pushing or Pulling and return just that string. But I'm not sure if you can use that with ODBC in WB3 or if you are even pulling from a TSQL table.
Sorry if that isn't much help ?1 -
Hey kshah008! Nope, the issue remains. I just can't seem to get this MID function figured out. Creating a CASE scenario doesn't make sense, because the verbiage following the colon (Accident: Fall) is dynamic. I'm not a SQL Jedi, so that doesn't help the situation. ?
Thanks for following up!
0 -
Pls try below fomula:
RIGHT( 'Strain or Injury By: Pushing or Pulling', LENGTH('Strain or Injury By: Pushing or Pulling') -locate(':','Strain or Injury By: Pushing or Pulling'))
0 -
@redbull wrote:Hey kshah008! Nope, the issue remains. I just can't seem to get this MID function figured out. Creating a CASE scenario doesn't make sense, because the verbiage following the colon (Accident: Fall) is dynamic. I'm not a SQL Jedi, so that doesn't help the situation. ?
Thanks for following up!
No problem! Tagging you again to check out Mark1's latest reply. @redbull
0
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.6K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 2.9K Transform
- 102 SQL DataFlows
- 626 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 755 Beast Mode
- 61 App Studio
- 41 Variables
- 693 Automate
- 178 Apps
- 456 APIs & Domo Developer
- 49 Workflows
- 10 DomoAI
- 38 Predict
- 16 Jupyter Workspaces
- 22 R & Python Tiles
- 398 Distribute
- 115 Domo Everywhere
- 276 Scheduled Reports
- 7 Software Integrations
- 130 Manage
- 127 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 11 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 110 Community Announcements
- 4.8K Archive