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
- 10.5K All Categories
- 8 Connect
- 918 Connectors
- 250 Workbench
- 472 Transform
- 1.7K Magic ETL
- 69 SQL DataFlows
- 477 Datasets
- 198 Visualize
- 254 Beast Mode
- 2.1K Charting
- 11 Variables
- 17 Automate
- 354 APIs & Domo Developer
- 89 Apps
- 3 Workflows
- 20 Predict
- 5 Jupyter Workspaces
- 15 R & Python Tiles
- 247 Distribute
- 63 Domo Everywhere
- 243 Scheduled Reports
- 21 Manage
- 42 Governance & Security
- 176 Product Ideas
- 1.2K Ideas Exchange
- 12 Community Forums
- 27 Getting Started
- 14 Community Member Introductions
- 55 Community News
- 4.5K Archive