Re: [SQL] Month/year between two dates

2009-08-12 Thread Jorge Godoy
I think he wanted something like: test=# create table month_test(id serial primary key, start_date date not null, end_date date not null); CREATE TABLE test=# insert into month_test (start_date, end_date) values ('2009-01-01'::date, '2009-08-31'::date); INSERT 0 1 test=# insert into month_test (st

Re: [SQL] Month/year between two dates

2009-08-11 Thread ramasubramanian
Dear Bor, How you will 1 record for 2009/05 (if you use 2009/05 ) it will fetch all the records as it is not having month 05 am i correct? - Original Message - From: "Bor" To: Sent: Tuesday, August 11, 2009 6:43 PM Subject: [SQL] Month/year between two dates Hi to all, I hav

Re: [SQL] Month/year between two dates

2009-08-11 Thread Steve Crawford
Bor wrote: Hi to all, I have a very simple question. Let's say that I have three records (id, date from, date to): 1 2009-01-01 2009-08-31 2 2009-08-01 2009-08-10 3 2009-08-11 2009-08-31 Now I want to get records, "related" to a single month/year data (two integers). Fo