hi!
how can I concatenate an apostrophe with a string column? I tried using join (" ’ "), column(“xyz”) but I get an error message
Hi @Emilychan112 , it is useful if you can mention which node you are using as the syntax can differ between them. Within any one scripting node there can be multiple ways to perform the concatenation
In the examples below, they concatenate the “single quote” character rather than what is technically an apostrophe. I wasn’t sure whether that is what you actually wanted, or if you wanted the “smart quote” that I think is shown in your post above ("’"
) to the column “xyz”. It’s possible that this was “converted” by the forum software. Feel free to change the actual character used in the code below to suit your needs.
e.g.
String Manipulation
join("'",$xyz$)
string("'" +$xyz$)
Column Expressions (Older “labs” extension)
join("'",column("xyz"))
"'"+column("xyz")
Expressions (new in KNIME 5.3)
join("","'",$["xyz"])`
"'"+$["xyz"]
join("","'",$xyz)`
"'"+$xyz
(note the first argument to join() in the Expressions node defines the “separator character” which in this case is an empty string as there is no separator character in your requirement.)
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.