string-concatenation
ConcatRelated Function Returns All Values
Using Allen Browne's ConcatRelated function is not returning correctly. Example: OrderNumber Product Types 00054001021 ROUND 00054001021 WHITE 00054001121 CONCAVE 00054001121 SCORED 00054001121 WHITE 00054001221 CAPSULE 00054001221 SCORED 00054001221 WHITE Using this: SELECT DISTINCT YourTable2.OrderNumber, ConcatRelated("[Product Types]","YourTable2","[OrderNumber]="& "[OrderNumber]","[Product Types]",",") AS All_Product_Types FROM YourTable2; Is returning all of the ProductTypes for each Order Number: OrderNumber All_Product_Types 00054001021 CAPSULE,CONCAVE,ROUND,SCORED,SCORED,WHITE,WHITE,WHITE 00054001121 CAPSULE,CONCAVE,ROUND,SCORED,SCORED,WHITE,WHITE,WHITE 00054001221 CAPSULE,CONCAVE,ROUND,SCORED,SCORED,WHITE,WHITE,WHITE It should be: OrderNumber All_Product_Types 00054001021 ROUND, WHITE 00054001121 CONCAVE, SCORED, WHITE 00054001221 CAPSULE, SCORED, WHITE What am I doing wrong?
I actually solved this myself. I needed more quotation marks (") since my Order Number field is text. In case someone else has the same issue, the query should look like this: SELECT DISTINCT YourTable2.OrderNumber, ConcatRelated("[Product Types]","YourTable2","[OrderNumber]="""& [OrderNumber] & """","[Product Types]",",") AS All_Product_Types FROM YourTable2;
Related Links
ConcatRelated Function Returns All Values
In java properties file itself can we concatenate two or more than two variables together?
“No message” when writing string with console.log()
Moqui:We can use create an view with concatenating two or more columns as single column. simple can we do concatenatio in moqui view creqtion.
Error in ConcatRelated
String Concatenating functions in Progress 4GL?
sybase - simple concatenation
How do you concatenate strings in a Puppet .pp file?