Quotation marks in SQL query

Hello. I am writing a microflow to concatenate a string. This string will be used as the input for an SQL WHERE constraint. I want the value of an attribute to be inside single quotation marks. This is what i do now: I create an empty string variable $SQLinput. Then I loop over a list of 2 OppPartyCode objects. Inside the loop I change the $SQLinput variable: if $SQLinput = empty then ' WHERE CODE='+$OppPartyCode/Code else $SQL_Input + ' AND CODE='+$OppPartyCode/Code The result is the string: WHERE CODE=TE AND CODE=ST. However, I want the TE and ST values to be between single quotation marks like this: WHERE CODE='TE' AND CODE='ST' How do I achieve this? Thanks!
1 answers

Use the character ' twice. e.g.

if $SQLinput = empty then ' WHERE CODE='''+$OppPartyCode/Code else $SQL_Input + ''' AND CODE='''+$OppPartyCode/Code + ''''