How do I escape single quotes/apostraphes in a Beast Mode?
Suppose I have Beast Mode the following syntax:
CASE
WHEN `lastName` = 'O'Sullivan'
THEN ...
The apostrophe in O'Sullivan breaks the Beast Mode. Is there a way to escape the character?
Comments
-
Standard mySQL syntax does not work here, so I would be curious to know if there's a solution to this, also.
0 -
I tried a couple mySQL syntax with no luck. The only thing that I found was to do a LIKE operator.
CASE WHEN LASTNAME LIKE 'O%' AND LASTNAME LIKE '%Sullivan' THEN ...
The statement above just states that the last name must start with O and end with Sullivan.
Hope this helps
2 -
@brianfriedman I have submitted an bug ticket with development for this and requested a way to escape charicters in Beast Modes. I will update you on it's progress when I know more.
Ticket # 00474129
Thanks!
I work for Domo.
**Say "Thanks" by clicking the thumbs up in the post that helped you.
**Please mark the post that solves your problem as "Accepted Solution"2 -
I hit this same issue.
Until the fixed gets pushed out, a possible work-around is
CASE WHEN LASTNAME LIKE 'O_Sullivan' THEN ...
The "_" is a wildcard for a single character only. This will fail if a character other than an apostrophe could be between the "O" and "S", but will probably work for most specifica cases.
1 -
To escape a single-quote in a Beast Mode equals "=" operation, use 2 single quotes instead of 1. For example:
CASE
WHEN `lastName` = 'O''Sullivan'
THEN ...Starlord
**Say “Thanks” by clicking the “heart” in the post that helped you.
**Please mark the post that solves your problem by clicking on "Accept as Solution"7 -
Can someone suggest a solution? Thank you.
0 -
Hello user08600, please see my previous response. Two apostrophes in a row represents an escaped apostrophe. For example, 'O''Sullivan' is valid for specifying the name O'Sullivan with an escape on the apostrophe.
Starlord
**Say “Thanks” by clicking the “heart” in the post that helped you.
**Please mark the post that solves your problem by clicking on "Accept as Solution"1 -
Try using single quotes 2 times:
INSTR(`column name`,'DOMO''s')
Then should help.
1 -
Hi There
after 5 years this doesn't seem to be resolve. Even escaping:
CASE WHEN `Metric` = 'Don\'t Use' THEN ....
0 -
@user10221 Is there any additional context you can provide? There are a number of solutions listed in this post that have been successful for most users. Can you provide an example of the issue you are running in to?
Thanks!
I work for Domo.
**Say "Thanks" by clicking the thumbs up in the post that helped you.
**Please mark the post that solves your problem as "Accepted Solution"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
- 753 Beast Mode
- 61 App Studio
- 41 Variables
- 692 Automate
- 177 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