| От | Thomas Kellerer |
|---|---|
| Тема | Re: Alternative to AS? |
| Дата | |
| Msg-id | i8hfcs$k1p$1@dough.gmane.org обсуждение исходный текст |
| Ответ на | Alternative to AS? (Helgi Örn <sacredeagle@gmail.com>) |
| Список | pgsql-novice |
Helgi Örn, 06.10.2010 10:58: > Hi! I am moving a database project from MySQL to PostgreSQL I was a > newbie there and now I am a newbie here :) > > I have this form mysql: > SELECT tid_in, TIME_FORMAT(tid_in, '%H.%i')AS format FROM timmar; > > Which I have gotten postgre to accept thus far: > SELECT pack_tidin TIME_FORMAT, pack_tidin '%H.%i', AS format FROM timmar; > > it stops at AS which doesn't seem to exist is postgre, what is > postgres alternative to AS? You have an extra comma in front of the AS, which is causing the error. But even then, I don't think your formatting would work, you will need to use the to_char() function for that. Regards Thomas P.S.: it's "postgres" not "postgre" ;)
В списке pgsql-novice по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера