While inserting not so special quote character error occured

Hi. I was just inserting some changesets with input as:
’ I love liquibase’s features ’ . As you see there is an extra ’ character inside the quotes but I dont know how to use it without getting error, can you help please?
Thanks

Hi @karslan,

To resolve the issue with such quote characters inside string, escaping these single quotes ' by doubling them up -> '' is the standard way and works of course:

So what I mean is, you can try it this way:

’ I love liquibase’’s features ’

Please note two ’’ quotes, doubling them will escape the quote character that we want to be in the output string.

Please try it out and let me know if it worked.

Hope this helps.

Thanks,
Rakhi Agrawal

Hi @rakhi ,
Thanks a lot for your answer. I need the string output as it is now unfortunately so I cant use double quote… (Because values are coming from different databases )
So let say my output should exactly look like below. (I am not writing the real string for job reasons). Thank you
’I love liquibase’ features’

*btw I tried with & apos ; (without spaces) … In the output it looks what I wanted
‘I love liquibase’ features’

But still getting error from liquibase. Thanks

umm okay :thinking:

Just to explain what I did and what was my test case :
Aim - I wanted to insert string ‘I love liquibase’ features’ (string inserted into DB had 3 quotes, one at the start, one at the end and one with word liquibase inside string value)
What I did - I wrapped this string inside single quotes ’ ’ and then ran the changeset. My changeset query looked like this :

INSERT INTO TEST_TABLE (Data) VALUES ('‘I love liquibase’ features’');

I was able to see the inserted string in DB as ‘I love liquibase’ features’

Not sure if I understood your issue correctly or not. :slight_smile:

Thanks,
Rakhi Agrawal