On 6/25/06, Sim Zacks <[EMAIL PROTECTED]> wrote:
Merlin,
Thank you for your input. My original question did specifically mention
that the events had to be on the same day.
> I need to have a query that gives per employee each event and the event after
it if it happened _on the same day_.
wh
Merlin,
Thank you for your input. My original question did specifically mention
that the events had to be on the same day.
I need to have a query that gives per employee each event and the event after it if it happened _on the same day_.
Secondly, I hadn't seen that syntax in 8.2 yet. That
On 20 Jun 2006 18:20:55 +0200, Harald Fuchs <[EMAIL PROTECTED]> wrote:
In article <[EMAIL PROTECTED]>,
Sim Zacks <[EMAIL PROTECTED]> writes:
> To get this result set it would have to be an inner join on employee
> and date where the second event time is greater then the first. But I
> don't want
Thanks for pointing it out You are right; I forgot to add that...
On 6/20/06, Aaron Evans <[EMAIL PROTECTED]> wrote:
sorry to nitpick, but I think that to get this query to do exactly
what you want you'll need to add ordering over EventTime on your sub-
selects to assure that you get the ne
sorry to nitpick, but I think that to get this query to do exactly
what you want you'll need to add ordering over EventTime on your sub-
selects to assure that you get the next event and not just some event
later event on the given day.
-ae
On Jun 20, 2006, at 11:12 AM, Gurjeet Singh wrot
Harold,
That's brilliant.
Sim
Harald Fuchs wrote:
In article <[EMAIL PROTECTED]>,
Sim Zacks <[EMAIL PROTECTED]> writes:
I want my query resultset to be
Employee,EventDate(1),EventTime(1),EventType(1),EventTime(2),EventType(2)
Where Event(2) is the first event of the employee that took place
af
In article <[EMAIL PROTECTED]>,
Sim Zacks <[EMAIL PROTECTED]> writes:
> I want my query resultset to be
> Employee,EventDate(1),EventTime(1),EventType(1),EventTime(2),EventType(2)
> Where Event(2) is the first event of the employee that took place
> after the other event.
> Example
> EventIDE
On Tue, Jun 20, 2006 at 05:13:50PM +0200, Sim Zacks wrote:
> Thank you for responding.
> I was thinking along those lines as well, though that would be an
> absolute performance killer.
I shouldn't be too bad, if you have the appropriate indexes defined.
However, it seems to me this is the kind
I agree about the performance; but it won't be that bad if PG can
unnest these subqueries and convert them into join views!!! In that
case, these views would return just one row (LIMIT 1), and that is the
best a developer can do to help the optimizer make the decision. If
the optimizer knows th
Thank you for responding.
I was thinking along those lines as well, though that would be an
absolute performance killer.
Gurjeet Singh wrote:
It would have been quite easy if done in Oracle's 'lateral view'
feature. But I think it is achievable in standard SQL too; using
subqueries in the sele
It would have been quite easy if done in Oracle's 'lateral view'
feature. But I think it is achievable in standard SQL too; using
subqueries in the select-clause.
Try something like this:
select
Employee, EventDate,
EventTime as e1_time,
EventType as e1_type,
(
I am having brain freeze right now and was hoping someone could help me
with a (fairly) simple query.
I need to join on the next row in a similar table with specific criteria.
I have a table with events per employee.
I need to have a query that gives per employee each event and the event
after
12 matches
Mail list logo