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.5K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.9K Transform
- 100 SQL DataFlows
- 616 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 738 Beast Mode
- 57 App Studio
- 40 Variables
- 685 Automate
- 176 Apps
- 452 APIs & Domo Developer
- 47 Workflows
- 10 DomoAI
- 36 Predict
- 15 Jupyter Workspaces
- 21 R & Python Tiles
- 394 Distribute
- 113 Domo Everywhere
- 275 Scheduled Reports
- 6 Software Integrations
- 124 Manage
- 121 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 10 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 108 Community Announcements
- 4.8K Archive