2015-04-28 03:56:23 +00:00
|
|
|
SELECT transform(number, [3, 5, 7], [111, 222, 333]) FROM system.numbers LIMIT 10;
|
|
|
|
SELECT transform(number, [3, 5, 7], [111, 222, 333], 9999) FROM system.numbers LIMIT 10;
|
|
|
|
SELECT transform(number, [3, 5, 7], ['hello', 'world', 'abc'], '') FROM system.numbers LIMIT 10;
|
|
|
|
SELECT transform(toString(number), ['3', '5', '7'], ['hello', 'world', 'abc']) FROM system.numbers LIMIT 10;
|
|
|
|
SELECT transform(toString(number), ['3', '5', '7'], ['hello', 'world', 'abc'], '') FROM system.numbers LIMIT 10;
|
|
|
|
SELECT transform(toString(number), ['3', '5', '7'], ['hello', 'world', 'abc'], '-') FROM system.numbers LIMIT 10;
|
|
|
|
SELECT transform(toString(number), ['3', '5', '7'], [111, 222, 333], 0) FROM system.numbers LIMIT 10;
|
2015-04-28 05:21:41 +00:00
|
|
|
SELECT transform(toString(number), ['3', '5', '7'], [111, 222, 333], -1) FROM system.numbers LIMIT 10;
|
|
|
|
SELECT transform(toString(number), ['3', '5', '7'], [111, 222, 333], -1.1) FROM system.numbers LIMIT 10;
|
|
|
|
SELECT transform(toString(number), ['3', '5', '7'], [111, 222.2, 333], 1) FROM system.numbers LIMIT 10;
|
2022-03-24 02:37:24 +00:00
|
|
|
SELECT transform(1, [2, 3], ['Bigmir)net', 'Google'], 'Остальные') AS title;
|
|
|
|
SELECT transform(2, [2, 3], ['Bigmir)net', 'Google'], 'Остальные') AS title;
|
|
|
|
SELECT transform(3, [2, 3], ['Bigmir)net', 'Google'], 'Остальные') AS title;
|
|
|
|
SELECT transform(4, [2, 3], ['Bigmir)net', 'Google'], 'Остальные') AS title;
|
2019-07-10 10:19:14 +00:00
|
|
|
SELECT transform('hello', 'wrong', 1); -- { serverError 43 }
|
|
|
|
SELECT transform('hello', ['wrong'], 1); -- { serverError 43 }
|
|
|
|
SELECT transform('hello', ['wrong'], [1]); -- { serverError 43 }
|
|
|
|
SELECT transform(tuple(1), ['sdf'], [1]); -- { serverError 43 }
|