Re: [SQL] Query Assistance

2007-12-12 Thread Richard Huxton
Gary Chambers wrote: D'Arcy... Have you considered this? I considered integrating the begin and end times into the table. I'm capturing the data via ACPI events, so it's "transactional" by nature. I want to be able to keep track of false transitions (hence the is_outage field). I'm looking

Re: [SQL] Query Assistance

2007-12-12 Thread Gary Chambers
D'Arcy... > Have you considered this? I considered integrating the begin and end times into the table. I'm capturing the data via ACPI events, so it's "transactional" by nature. I want to be able to keep track of false transitions (hence the is_outage field). I'm looking for a way to simplify t

Re: [SQL] Query Assistance

2007-12-12 Thread D'Arcy J.M. Cain
On Wed, 12 Dec 2007 11:58:20 -0500 "Gary Chambers" <[EMAIL PROTECTED]> wrote: > All... > > I have a simple table in PostgreSQL 8.2.5: > > CREATE TABLE power_transitions ( > -- Transition ID (PK) > tid integer NOT NULL, > -- State ID (0 = Unknown, 1 = Online (AC power), 2 = Offline (Ba

[SQL] Query Assistance

2007-12-12 Thread Gary Chambers
All... I have a simple table in PostgreSQL 8.2.5: CREATE TABLE power_transitions ( -- Transition ID (PK) tid integer NOT NULL, -- State ID (0 = Unknown, 1 = Online (AC power), 2 = Offline (Battery) sid smallint NOT NULL, -- Timestamp of transition statetime timestamp witho

Re: [SQL] query assistance

2003-11-04 Thread Michael Glaesemann
Hi Jodi, On Wednesday, November 5, 2003, at 12:16 AM, Jodi Kanter wrote: Is there a straight forward way to pull out duplicates in a particular field given a value in another field? For example, I have a table that lists users and study names associated with those users. Each user can have one or

Re: [SQL] query assistance

2003-11-04 Thread Richard Huxton
On Tuesday 04 November 2003 15:16, Jodi Kanter wrote: > Is there a straight forward way to pull out duplicates in a particular > field given a value in another field? > For example, I have a table that lists users and study names associated > with those users. Each user can have one or more study n

[SQL] query assistance

2003-11-04 Thread Jodi Kanter
Is there a straight forward way to pull out duplicates in a particular field given a value in another field? For example, I have a table that lists users and study names associated with those users. Each user can have one or more study names. My goal is to determine if any of these people have