| От | Richard Huxton |
|---|---|
| Тема | Re: SELECT question |
| Дата | |
| Msg-id | 200311041114.14676.dev@archonet.com обсуждение исходный текст |
| Ответ на | SELECT question (Alex <alex@meerkatsoft.com>) |
| Список | pgsql-general |
On Tuesday 04 November 2003 10:54, Alex wrote: > Hi, > > I have a bit string , 7 bits, every bit representing a day of the week. > e.g. 1110011. > Is there and easy way where I can translate/format that string in a query. > I want to give the string back with a '-' for every 0 and the first char > of the Day for every '1'. > example 1100111 = SM--TFS. You probably want a small function in plpgsql - see the procedural languages section of the manual for details. You might want to check the cookbook at http://techdocs.postgresql.org/ and see if there's similar code you can use as inspiration. -- Richard Huxton Archonet Ltd
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера