Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
What does this expression mean please:
LISTECIP:
LOAD Concat(CODE,'#,#') as ListeCODE
resident PRODUIT
;
let liste_code= chr(39)&replace(peek('ListeCODE',0,'LISTCODE'),'#',chr(39))&chr(39);
Load Concat(CODE, '#,#') as ListeCODE
This section of code concatenates all the codes separated by #,# symbols. That is ListeCODE would have values like:
Code1#,#Code2#,#Code3#,#.....
The variable declaration, reads the value from the field ListeCODE to the variable liste_code after replacing # with char(39)character, i.e. - ' (single quote), and an extra char(39) at the beginning and end of the string. Hence the variable would hold a string like:
'Code1','Code2','Code3',....
Hope this helps.
Load Concat(CODE, '#,#') as ListeCODE
This section of code concatenates all the codes separated by #,# symbols. That is ListeCODE would have values like:
Code1#,#Code2#,#Code3#,#.....
The variable declaration, reads the value from the field ListeCODE to the variable liste_code after replacing # with char(39)character, i.e. - ' (single quote), and an extra char(39) at the beginning and end of the string. Hence the variable would hold a string like:
'Code1','Code2','Code3',....
Hope this helps.