I want to put the street name in my field calculator.

The problem is, that it contains the apostrophe as per in the image below:

enter image description here

The expression becomes invalid.

Even if I try:

 "Christy's Yard"

or even

 ""Christy's Yard""

regarding to this thread

How to insert a quotation mark through the Field Calculator of attribute table of a Shapefile?

is still wrong.

Is there any way to include the apostrophe inside the field calculator text, which must be quoted?


You just need to double the problematic apostrophe so the expression become :

'Christy''s Yard'
| improve this answer | |

Also you can escape the apostrophe with backslash \

enter image description here

| improve this answer | |

Try concatenating the phrase together using a char code:

'Christy' || CHAR(39) || 's yard'

EDIT: Yeah @J.R's answer is better, +1

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.