Skip to main content
Question

In PQL, how do you concatenate a single quotation in a string? I am trying to generate a column of SQL input, e.g., value=to_date('date_value' , 'MM/DD/YYYY'). I need to concat a single quote on the front/back of the date_value.

  • August 2, 2024
  • 3 replies
  • 26 views

david.stefa13
Level 5
Forum|alt.badge.img+15
In PQL, how do you concatenate a single quotation in a string? I am trying to generate a column of SQL input, e.g., value=to_date('date_value' , 'MM/DD/YYYY'). I need to concat a single quote on the front/back of the date_value.

3 replies

manuel.wetze
Level 9
Forum|alt.badge.img+8

 

Unsure if I understood your problem correctly. But I am pretty sure that your solution will include the concat transformation. https://docs.celonis.com/en/concat.html

 

it might be CONCAT( to_date('date_value' , 'MM/DD/YYYY'),'...') what might make it tricky is that ' character is already reservered for indicating string values in PQL. Maybe there is an escape character to make it happen.


david.stefa13
Level 5
Forum|alt.badge.img+15

 

Unsure if I understood your problem correctly. But I am pretty sure that your solution will include the concat transformation. https://docs.celonis.com/en/concat.html

 

it might be CONCAT( to_date('date_value' , 'MM/DD/YYYY'),'...') what might make it tricky is that ' character is already reservered for indicating string values in PQL. Maybe there is an escape character to make it happen.

To clarify, what is the escape character that enables concatenating a single quotation in a string, e.g., CONCAT ''' does not work.


david.stefa13
Level 5
Forum|alt.badge.img+15

I ended up figuring it out. The escape key is \\', e.g., '\\''