Re: [GENERAL] Join query help

2007-08-20 Thread Michael Glaesemann
On Aug 20, 2007, at 20:33 , novice wrote: Many many thanks for all the advice =) Glad to help. Good luck! Michael Glaesemann grzm seespotcode net ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.p

Re: [SQL] [GENERAL] Join query help

2007-08-20 Thread Michael Glaesemann
On Aug 20, 2007, at 20:27 , Michael Glaesemann wrote: Note: record_id is in integer, yet you're quoting the value ('1'). This causes the server to cast the text value to an integer. Here it's not going to cause much of a problem, just a couple CPU cycles. In table definitions (and possibly

Re: [GENERAL] Join query help

2007-08-20 Thread novice
Many many thanks for all the advice =) On 21/08/07, Michael Glaesemann <[EMAIL PROTECTED]> wrote: > > On Aug 20, 2007, at 19:52 , novice wrote: > > > Try 2: Here are my DDLs & DMLs > > Thanks for the data. It looks like the data you provided in the first > set was a little different, and the quer

Re: [GENERAL] Join query help

2007-08-20 Thread Michael Glaesemann
On Aug 20, 2007, at 19:52 , novice wrote: Try 2: Here are my DDLs & DMLs Thanks for the data. It looks like the data you provided in the first set was a little different, and the queries I supplied in my previous message give you the results you want. CREATE TABLE record ( record_id

Re: [GENERAL] Join query help

2007-08-20 Thread novice
Try 2: Here are my DDLs & DMLs -- Start CREATE TABLE record ( record_id integer PRIMARY KEY, record_date timestamp with time zone NOT NULL ); INSERT INTO record(record_id, record_date) VALUES ('1', '2007-07-23 11:30:37'); INSERT INTO record(record_id, record_date) VALUES ('2', '2007-07-27 1

[GENERAL] Join query help

2007-08-20 Thread Raj A
Hi, We have the following three tables. safety=> SELECT record_id, record_date FROM record; record_id | record_date ---+ 1 | 2007-07-23 11:30:37+10 2 | 2007-07-27 11:30:14+10 3 | 2007-07-17 13:15:03+10 (3 rows) safety=> SELECT obser