Re: help me with this query

2002-07-23 Thread Benjamin Pflugmann
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

Re: help me with this query

2002-07-17 Thread Francisco Reinaldo
MAIL PROTECTED]>; "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

Re: help me with this query

2002-07-16 Thread Arul
"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 >

Re: help me with this query

2002-07-16 Thread Francisco Reinaldo
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

help me with this query

2002-07-16 Thread Arul
Hi All The Table design goes like this Company Table companyid integer name varchar(100) Services Table ServiceIDinteger Servicevarchar(50) Company Services --- companyidinteger - References Company(companyid

help me with this query

2002-07-16 Thread Arul
Hi All The Table design goes like this Company Table companyid integer name varchar(100) Services Table ServiceIDinteger Servicevarchar(50) Company Services --- companyidinteger - References Company(companyid

Re: help me with this query

2002-07-02 Thread Mikhail Entaltsev
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, J

help me with this query

2002-07-02 Thread Arul
Hi All I have two tables User and Company User tables has userid , companyid and status Company table has companyid and companyname It's not necessary that all users should have company.There can be users without company also and for them the companyid is null. so i need all the users whose st