| От | Bruno Wolff III |
|---|---|
| Тема | Re: Is there anyway to do this? |
| Дата | |
| Msg-id | 20021018171333.GA26785@wolff.to обсуждение |
| Ответ на | Is there anyway to do this? (Wei Weng <wweng@kencast.com>) |
| Список | pgsql-sql |
On Fri, Oct 18, 2002 at 12:45:56 -0400, Wei Weng <wweng@kencast.com> wrote: > I have a table > > Table "Users" > Column | Type | Modifiers > -----------+------------------------+----------- > userid | character varying(40) | not null > username | character varying(64) | > > I want to get all the distinct first character of all usernames. And do > it in a way that is the most portable to MS SQL server. > > Is there anyway? Looking through the documentation on string functions would be helpful. An example solution is: select distinct substring(username from 1 for 1) from users;
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера