EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, September 03, 2004 6:48 PM
Subject: Re: HELP ME WITH THIS
> Hi,
> The only way I can think of is to join the table to itself. It should look
> something like this:
>
> select unix_timestamp(concat(s.date,'
Hi,
The only way I can think of is to join the table to itself. It should look
something like this:
select unix_timestamp(concat(s.date,' ',s.time)) -
unix_timestamp(concat(e.date,' ',e.time))
from table s left join table e on
( s.CallingStationId=e.CallingStationId and
s.CalledStationId=e.Ca
* Karma Dorji
> i have a table, like the one below,
> i need to find the time difference between the Start and Stop from a
> particular CallingStationId to particular CalledStationId.
>
> ++--++---+
> --
> +---+
If it were all in one row, you may be able to compare datetime fields.
I do not know if you can do this with 2 rows, and the query will probably
be rough.
Did you design the table? Can you create it so that your row has start and
stop times, instead of creating another row?
> -Original M
Hi.
IMHO, the self-join is the correct solution for the given table layout
(which looks reasonable to me).
Greetings,
Benjamin.
On Wed 2002-07-17 at 09:26:48 +0530, [EMAIL PROTECTED] wrote:
[...]
> > Select companyid, count(*) from CompanyServices where
> > serviceid = 1 or serviceid
ny) 1 services the three
service type.
Let me know if this is not what you wanted.
Bye and Good Luck.
> So how do we handle these situations
>
> -Arul
> - Original Message -
> From: "Francisco Reinaldo" <[EMAIL PROTECTED]>
> To: "Arul" <[E
"MySQL" <[EMAIL PROTECTED]>
Cc: "Arul" <[EMAIL PROTECTED]>
Sent: Wednesday, July 17, 2002 3:27 AM
Subject: Re: help me with this query
> Hi,
>
> Select companyid, count(*) from CompanyServices where
> serviceid = 1 or serviceid = 2 or serviceid = 3
>
Hi,
Select companyid, count(*) from CompanyServices where
serviceid = 1 or serviceid = 2 or serviceid = 3
group by companyid
having count(*) = 3
Bye and Good Luck.
--- Arul <[EMAIL PROTECTED]> wrote:
> Hi All
>
> The Table design goes like this
>
> Company Table
>
> companyid
select u.userid , c.companyname from
users u left join company c on (u.companyid = c.companyid)
where u.status = 'ACT'
Best regards,
Mikhail.
- Original Message -
From: "Arul" <[EMAIL PROTECTED]>
To: "MySQL" <[EMAIL PROTECTED]>
Sent: Tuesday, July 02, 2002 5:15 PM
Subject: help me with