yes this works fine in the simple example, thank you. Now a bit more advanced: As Oracle does not like all cahracters in a text string I think I have to replace them in advance with the corresponding chr(xx) as in QV.
LOAD * INLINE [
This & That
Today & Tomorrow
replace( xComments, chr(38), chr(39)&'||chr(38)||'&chr(39) ) as Comments
RESIDENT xComentsFromDataSource_t0 ;
DROP TABLE xCommentsFromDataSource_t0 ;
concat( distinct Comments, '; ') as AllComments
RESIEDENT CommentsFromDataSource ;
LET vAllComments = chr(39)&peek('AllComments')&chr(39) ;
'insert into TABLE (Field) value ($(vAllComments));' as InsertString
This results in: insert into TABLE(Field) value (''This ''||chr(38)||'' That; Today ''||chr(38)||'' Tomorrow'');
with double literals before/after the ||
instead of insert into TABLE (Field) value (This '||chr(38)||' THAT; Today....
what would be needed for Oracle. In this case adding the chr(39) before/after the variable doesn't help because the other double literals are no affected and anyway, the script crashes...