Re: Is there a way to replace select * fields in result ?

Поиск
Список
Период
Сортировка
Искать
От
Alban Hertroys
Тема
Re: Is there a way to replace select * fields in result ?
Дата
Msg-id
09C5EA9B-5BC3-441E-B4BC-484393085DB5@gmail.com
Ответ на
Список
Дерево обсуждения
Is there a way to replace select * fields in result ? Condor <condor@stz-bg.com>
Re: Is there a way to replace select * fields in result ? Alban Hertroys <haramrae@gmail.com>
Re: Is there a way to replace select * fields in result ? "David G. Johnston" <david.g.johnston@gmail.com>
Re: Is there a way to replace select * fields in result ? Condor <condor@stz-bg.com>


> On 12 Jun 2021, at 10:00, Condor  wrote:
> 
> select qw.*, case whem length(qw.mm) > 0 THEN COALESCE(SUBSTRING(qw.mm, 1, 1), '') ELSE qw.mm END AS qw.mm

A little off-topic, but isn’t that a roundabout way of writing just this?:

	select qw.*, coalesce(substring(qw.mm, 1, 1), '') as mm

Or even:

	select qw.*, coalesce(left(qw.mm, 1), '') as mm


Regards,

Alban Hertroys
--
There is always an exception to always.






В списке pgsql-general по дате отправления
От: Condor
Дата:
От: Shubham Mittal
Дата:
FAQ