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.8K All Categories
- 3 Private Company Board
- 1 APAC User Group
- 12 Welcome
- 39 Domo News
- 9.7K Using Domo
- 1.9K Dataflows
- 2.5K Card Building
- 2.2K Ideas Exchange
- 1.2K Connectors
- 343 Workbench
- 260 Domo Best Practices
- 11 Domo Certification
- 464 Domo Developer
- 50 Domo Everywhere
- 105 Apps
- 714 New to Domo
- 85 Dojo
- Domopalooza
- 1.1K 日本支部
- 4 道場-日本支部へようこそ
- 27 お知らせ
- 64 Kowaza
- 299 仲間に相談
- 653 ひらめき共有