I have a table #"DistinctCompanyCode" with only 1 column [Company Code]
In PowerQuery, I was able to get it into a string
= Text.Combine(List.Buffer(#"DistinctCompanyCode"[Company Code]), ",")
Where the result becomes 123,456,789
My question is, how can I make it to have single quote at the beginning and end of the "str"
Desired result to be '123','456','789'
so that I can use this to put in the IN sql statement
you can try something like below
= [a= DisctinctCompanyCode[Company Code],
b=List.Transform(a,each "'"&_&"'"),
c=Text.Combine(List.Buffer(b), ",")][c]