Re: [SQL] date comparision ???

2000-07-12 Thread Ross J. Reedstrom
On Mon, Jul 10, 2000 at 11:52:16AM +0300, sandis wrote: > Thanks for your input. Unfortunately, it doesn't helped.. > > Here is the samples. > > This query works fine: > SELECT datums_ FROM jaunumi WHERE flag = 'a' AND date_part('year',datetime > '2000-06-02 06:11:01-07') = '2000' LIMIT 1; > dat

Re: [SQL] date comparision ???

2000-07-12 Thread sandis
esentation 'datums_' datums_ is a timestamp field. How do i get it's value to use in date_part() function?? date_part('year',datums_) and date_part('year',datetime datums_) doesnt work also! - Original Message - From: Jie Liang To: sandis Sent: Friday, July

[SQL] date comparision

2000-07-07 Thread sandis
Is anyone out here can give some advice? i have a table with a timestamp field. i should know if there is records for the particular year and month so i need a query like (in MySQL it was very simple, but i should move to postgres!): SELECT something FROM mytable WHERE MONTH('timestamp_field')=0