Re: Retrieve month from date

Поиск
Список
Период
Сортировка
От A. Kretschmer
Тема Re: Retrieve month from date
Дата
Msg-id 20070420123544.GG15322@a-kretschmer.de
обсуждение исходный текст
Ответ на Retrieve month from date  ("Rohit Khare" <rpk.general@gmail.com>)
Список pgsql-sql
am  Fri, dem 20.04.2007, um 17:49:33 +0530 mailte Rohit Khare folgendes:
> I am using PGSQL 8.2.3 on Windows XP.
> 
> I have a table called "StudentFeesPayment" with columns "ReceiptNo" and
> "ReceiptMonthYear".
> The column, "ReceiptMonthYear" stores date in the format "yyyy-mm-dd". I have
> to find the max(ReceiptNo) where Month of (ReceiptMonthYear)=4. Or whatever
> month I give.
> 
> I tried:
> 
> Select max(ReceiptNo) from StudentFeesPayment where Extract(Month
> ('ReceiptMonthYear'))=4;
> 
> But it is not working. How to do it?

... where extract(month from "ReceiptMonthYear") = 4


Andreas
-- 
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47150,   D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID:   0x3FFF606C, privat 0x7F4584DA   http://wwwkeys.de.pgp.net


В списке pgsql-sql по дате отправления:

Предыдущее
От: "Bart Degryse"
Дата:
Сообщение: Re: Retrieve month from date
Следующее
От: Joe
Дата:
Сообщение: Re: We all are looped on Internet: request + transport = invariant