SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
with t as ( select * from ( values ('Иванов Максим Александрович'), ('ПЕТРОВ ДМИТРИЙ ТИМОФЕЕВИЧ'), ('борисов николай родионович') )foo (name) ) select *, concat_ws(' ', rpad( upper( substring( split_part(name, ' ', 1) for 1) ), length( split_part(name, ' ', 1) ) , '*'), rpad( upper( substring( split_part(name, ' ', 2) for 1) ), length( split_part(name, ' ', 2) ) , '*'), rpad( upper( substring( split_part(name, ' ', 3) for 1) ), length( split_part(name, ' ', 3) ) , '*') ) as fix_name from t

Stuck with a problem? Got Error? Ask ChatGPT!

Copy Clear