Is it possible to use “Left” in combination with a separation marker like comma?
I get a lot of tables resulting from multiplechoice boxen where there are a few numbers separated by a comma. I’m looking for a way to split these (preferably in Webi).
Example;
1,4,7
1,12,18
3,14,5
These are not easy to split with a “left” command because they vary in length…
You can create complex objects directly in the universe, using SQL expression. It is generally much more efficient than big variables inside webi documents. And you don’t have to redefine variables for each document as it is available directly as universe object
What is the backend database? Oracle or something else?
If it’s oracle, then use Substr function in conjunction with Instr to split the string and create columns such as Value 1, Value 2, Value 3, and so on.
Value 1 = substr(table.column , 1 , instr(table.column , ‘,’ , 1)-1)
Value 2 = substr(table.column, instr(table.column , ‘,’ , 1)+1, instr(table.column , ‘,’ , 2)-1)
Value 2 = substr(table.column, instr(table.column , ‘,’ , 2)+1, instr(table.column , ‘,’ , 3)-1)