From: | Mike E <mee(at)quidquam(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Time Difference |
Date: | 2000-10-27 11:13:13 |
Message-ID: | 20001027041313.C33190@quidquam.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
I have the following setup:
appt=# select * from availability \g
emp_id | date | start_time | end_time
--------+------------+------------+----------
1 | 2000-10-30 | 08:00:00 | 14:30:00
appt=# select * from appointments \g
start_time | end_time | emp_id | cus_id | services | date
------------+----------+--------+--------+----------+------------
09:00:00 | 11:30:00 | 1 | 2 | {1,2,3} | 2000-10-30
Now, what I would like to get is the following:
start_time | end_time
------------+----------
08:00:00 | 09:00:00
11:30:00 | 14:30:00
I'm trying to generate a result set of all the free time slots in
availability by taking the difference of the two. I've so far been
unable to generate anything that works. Is this possible?
Mike
--
Mike Erickson <mee(at)quidquam> http://www.quidquam.com/
"Hatred is the coward's revenge for being intimidated" - George Bernard Shaw
From | Date | Subject | |
---|---|---|---|
Next Message | cp | 2000-10-27 11:50:05 | problem with views |
Previous Message | Igor Roboul | 2000-10-27 09:45:11 | Timestamp |