This content has been marked as final. Show 3 replies
If it is only for display then can you do something like below
ttisql -v 1 -e "vertical 1;select name,address,phone from users; exit;"
It will display the columns in below format
name : test
address : test,test
phone : 1234
You can also use SUBSTR and INSTR function like below to replace "," with "~"
select name,substr(address,1,instr(address,',')-1) || '~' || substr(address,instr(address,',')+ 1),phone from users;
< John Doe, 123 Any St~ Anytown, 7035551212>
* Restriction here is the address field should have only one comma(",") in it , multiple comma won't give desire result)