Chris W wrote:
I have two tables, one is a list of users and the other is a list of
events for each user. It is a one to many relationship. The event
table is pretty simple just an event type and a the date and time of the
event in a datetime field.
I need a query that shows all events of a
I have no idea what I was thinking. For some reason I was thinking
Distinct wouldn't work, must have been temporarily brain dead. Thanks
for the wake up call.
Gerald L. Clark wrote:
Chris W wrote:
I have two tables, one is a list of users and the other is a list of
events for each user.
Dear all,
I have two tables,let's call then a and b:
Table a:
CUI1|CUI2
C001|C002
C002|C003
C003|C055
C004|C002
...
Table b:
CUI|STY
C001|T001
C002|T002
C003|T003
C004|T004
C005|T006
C055|T061
..
And the join table should be:
T001|T002
T002|T003
T003|T061
T004|T002
http://dev.mysql.com/doc/refman/4.1/en/example-maximum-column-group-row.html
I'd translate it to your example, but it's bed-time here in England!
HTH,
James Harvard
At 11:42 pm + 5/1/06, Terry Spencer wrote:
I have a question for clearer brains than mine. I would like to join two
tables,.
On Thu, 3 Jun 2004 13:06:54 -0700
Chris Dietzler [EMAIL PROTECTED] wrote:
Running 4.0.18
I am trying to run a query where the query gets the offer_ID of a
certain customer from the offer table and displays in the results
the offer_Name associated with the offer_ID. Right now the way the
On Thu, 3 Jun 2004 15:22:36 -0500
Josh Trutwin [EMAIL PROTECTED] wrote:
Or in preferable INNER JOIN syntax which makes it easier to forget a
JOIN condition:
Oops - I meant harder to forget not easier to forget. Doh.
SELECT c.cst_SiteID, c.cst_IDC, a.asset_ID, o.offer_ID,
o.offer_Name
SELECT table1.id FROM table1, table2, table3 WHERE table1.cl1 = 1 AND
table1.cle2=5 AND table1.cl3
IN(1,2,5,8) AND table2.cl1 = 4 AND table2.cle2 IN (10,12,81) AND
table2.cl3 IN (3,7) AND table3.distance BETWEEN 1 AND 99 AND table1.id =
table2.id AND table2.id = table3.id;
That should do what you
Anthony,
Do you mean this (not tested)?
Select table1.id from table1
INNER JOIN table2 USING (id)
INNER JOIN table3 USING (id)
WHERE table1.cl1 = 1 and table1.cle2=5 AND table1.cl3 IN(1,2,5,8)
AND table2.cl1 = 4 and table2.cle2 IN(10,12,81) AND table2.cl3 IN(3,7)
AND
Hi,
what is the difference between your way and Mike Hillyer way?? (I can see
the INNER join).
But thanx to both of you.
Anthony
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Re: Join question
Hi,
what is the difference between your way and Mike Hillyer way?? (I can
see
the INNER join).
But thanx to both of you.
Anthony
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com
: Anthony Ward
To: [EMAIL PROTECTED]
Sent: Thursday, June 05, 2003 1:53 PM
Subject: Re: Join question
Hi,
what is the difference between your way and Mike Hillyer way?? (I can see
the INNER join).
But thanx to both of you.
Anthony
--
MySQL General Mailing List
For list
Usually it's best to work with normalized tables, which would make this
trivial. tbl_reports isn't normalized, since it has a simulated array
of persons in it. Could it be split into two tables:
tbl_reports, with fields:
rep_id (primary key) and other report-specific information you didn't
On Fri, 2003-03-28 at 01:39, Bruce Feist wrote:
Usually it's best to work with normalized tables, which would make this
trivial. tbl_reports isn't normalized, since it has a simulated array
of persons in it. Could it be split into two tables:
i'm interested on how to normalize a table... can
alx wrote:
On Fri, 2003-03-28 at 01:39, Bruce Feist wrote:
Usually it's best to work with normalized tables, which would make this
trivial. tbl_reports isn't normalized, since it has a simulated array
of persons in it. Could it be split into two tables:
i'm interested on how to
the name for 'parentid'.
NJ -joseph
NJ -Original Message-
NJ From: Victoria Reznichenko [mailto:[EMAIL PROTECTED]]
NJ Sent: Thursday, December 05, 2002 9:01 AM
NJ To: [EMAIL PROTECTED]
NJ Subject: re: Join-question
NJ Michelle,
NJ Thursday, December 05, 2002, 5:46:03 PM, you wrote:
MdB I
* Michelle de Beer
I believe this question is solved by a join, but I
haven't really got a hang of it.
My table:
--
| uid | rootid | parentid | name |
--
| 1 | 0 | 0| name1|
| 2 | 1 | 1
- Original Message -
From: Michelle de Beer [EMAIL PROTECTED]
I believe this question is solved by a join, but I
haven't really got a hang of it.
My table:
--
| uid | rootid | parentid | name |
--
| 1 |
Hi:
You might find these articles from O'Reilly Network will help clear the
water.
http://www.onlamp.com/pub/ct/19
Doug
On Thu, 5 Dec 2002 07:46:03 -0800 (PST), Michelle de Beer wrote:
I believe this question is solved by a join, but I
haven't really got a hang of it.
My table:
Michelle,
Thursday, December 05, 2002, 5:46:03 PM, you wrote:
MdB I believe this question is solved by a join, but I
MdB haven't really got a hang of it.
MdB My table:
MdB --
MdB | uid | rootid | parentid | name |
MdB --
Peter,
If you would like to get such resultset
namefield1 field2 field3field4 field5 field6
-
test 12 5 6 9 10
test 12 5
Hi Mikhail!
The query should be released automaticly and it shoulb be something like:
SELECT a.*,b.*,c.* FROM ?? WHERE b.field3=5 OR c.field6=16
I want to have all entries wich fit to the condition. But at this time I don't know
weather there is a entry with name=test or test2 or not. So
Hi CH!
Thanks a lot! That's it!
I thought there is no differece between ON (condition) and USING(field), but there
is!
Thank you very much!
CU,
Peter
[EMAIL PROTECTED] schrieb am 19.09.02 12:02:58:
Hi Peter,
pls try this query. but its not tested.
select t1.name, t1.f1, t1.f2,
[EMAIL PROTECTED]
To: Mikhail Entaltsev [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, September 19, 2002 11:56 AM
Subject: Re: Re: JOIN-Question
Hi Mikhail!
The query should be released automaticly and it shoulb be something like:
SELECT a.*,b.*,c.* FROM ?? WHERE b.field3=5
How about:
mysql select count(*) from usernames INNER
JOIN pictures ON usernames.user=pictures.user where state = Delaware order
by ask limit 25;
-Original Message-
From: Boex,Matthew W. [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 04, 2002 2:09 PM
To: [EMAIL PROTECTED]
Subject:
PROTECTED]
Subject: RE: JOIN question
How about:
mysql select count(*) from usernames INNER
JOIN pictures ON usernames.user=pictures.user where state = Delaware order
by ask limit 25;
-Original Message-
From: Boex,Matthew W. [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 04, 2002 2:09 PM
.'; [EMAIL PROTECTED]
Subject: RE: JOIN question
How about:
mysql select count(*) from usernames INNER
JOIN pictures ON usernames.user=pictures.user where state = Delaware order
by ask limit 25;
-Original Message-
From: Boex,Matthew W. [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 04
Your two Title fields are not the same size.
This could prevent a match.
It will slow down joins in 3.22.
Carl Schrader wrote:
I have 2 tables with a common field of Title.
Table 1 defined as:
Name;varchar(60)
Title;varchar(60)
Year;varchar(4)
Other;varchar(30)
Other2;varchar(30)
What am I doing wrong?
The goal is to count the number of entries which match the account
preferences.
The results are correct, but the times are so far off...
mysql select count(*) from STLOUIS left join ClientSTL
- on STLOUIS.Dwell=ClientSTL.Dwell where ClientSTL.account='pruitt';
28 matches
Mail list logo