Replacing single quote/apostrophe with nothing
![MarkSnodgrass](https://us.v-cdn.net/6032830/uploads/userpics/7D2BHW2LB587/n90KQUCXOSG28.jpg)
![](https://us.v-cdn.net/6033814/uploads/M39SL97E7E4L/rank-coach.png)
I am trying to replace a single quote with nothing using the formula tile in Magic ETL, but it is giving me a syntax error. According to MySQL, you should be able to use a backslash as an escape character so that it will process correctly, but Domo is giving me an error. Any ideas?
**Make sure to
![<3 <3](https://community-forums.domo.com/resources/emoji/heart.png)
**Please mark as accepted the ones who solved your issue.
Best Answers
-
ETL Formula tile doesn't seem to want to handle single quotes correctly. I've been able to get it to remove single quotes using the Replace Text tile but you may have to put in the single quote a couple times as I've had it remove the single quote and replace my single quote with empty string.
You can copy the JSON code below and paste it into your ETL which should remove the single quotes. You'll just need to update the field names.
- {"contentType":"domo/dataflow-actions","data":[{"name":"Replace Text","id":"5a02f438-db47-4f1d-ac57-484a94fcf775","type":"ReplaceString","gui":{"x":156,"y":180},"dependsOn":["0c670718-8546-4cc5-a42b-51e326b70b6c"],"removeByDefault":false,"notes":[],"fields":[{"inStreamName":"Promotion","useRegex":false,"replaceString":"'","replaceByString":"","wholeWord":false,"caseSensitive":false}]}]}
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**1 -
Hi Mark,
SQL uses two single quotes to represent one in a string. so try using
- REPLACE(`Longitude`,'''','')
This should definitely work
1
Answers
-
ETL Formula tile doesn't seem to want to handle single quotes correctly. I've been able to get it to remove single quotes using the Replace Text tile but you may have to put in the single quote a couple times as I've had it remove the single quote and replace my single quote with empty string.
You can copy the JSON code below and paste it into your ETL which should remove the single quotes. You'll just need to update the field names.
- {"contentType":"domo/dataflow-actions","data":[{"name":"Replace Text","id":"5a02f438-db47-4f1d-ac57-484a94fcf775","type":"ReplaceString","gui":{"x":156,"y":180},"dependsOn":["0c670718-8546-4cc5-a42b-51e326b70b6c"],"removeByDefault":false,"notes":[],"fields":[{"inStreamName":"Promotion","useRegex":false,"replaceString":"'","replaceByString":"","wholeWord":false,"caseSensitive":false}]}]}
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**1 -
Hi Mark,
SQL uses two single quotes to represent one in a string. so try using
- REPLACE(`Longitude`,'''','')
This should definitely work
1 -
@tejusarora Thanks! I tried that earlier and it was giving me an error, but now it is working as well.
**Check out my Domo Tips & Tricks Videos
**Make sure toany users posts that helped you.
**Please mark as accepted the ones who solved your issue.1
Categories
- All Categories
- 1.9K Product Ideas
- 1.9K Ideas Exchange
- 1.6K Connect
- 1.3K Connectors
- 304 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 3K Transform
- 105 SQL DataFlows
- 644 Datasets
- 2.2K Magic ETL
- 4K Visualize
- 2.5K Charting
- 771 Beast Mode
- 74 App Studio
- 43 Variables
- 726 Automate
- 185 Apps
- 466 APIs & Domo Developer
- 61 Workflows
- 14 DomoAI
- 40 Predict
- 17 Jupyter Workspaces
- 23 R & Python Tiles
- 402 Distribute
- 116 Domo Everywhere
- 277 Scheduled Reports
- 9 Software Integrations
- 135 Manage
- 132 Governance & Security
- 8 Domo Community Gallery
- 44 Product Releases
- 12 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 111 Community Announcements
- 4.8K Archive