| От | Scott Marlowe |
|---|---|
| Тема | Re: Retrieve month from date |
| Дата | |
| Msg-id | 1177091187.24411.25.camel@state.g2switchworks.com обсуждение |
| Ответ на | Re: Retrieve month from date (RPK <rpk.general@gmail.com>) |
| Список | pgsql-sql |
On Fri, 2007-04-20 at 12:30, RPK wrote: > What this query will return: > > Select Extract(Month from 4/20/2007) from dual; > > I suspect "dual" is not for PGSQL but Oracle. But I need to run the above > query. What is the replacement of "dual" in PGSQL. > Well, you're going to have to create a special one row table with contraints and triggers to always keep it at one row and now allow anyone to insert into it and... just kidding. All you need is: select extract(month from '4/20/2007'::date); i.e. no need for the extraneous from dual there.
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера