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. It
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 c
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 certain type fo
> 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
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
...
So,I should "convert"
a.rhrssid = b.sid))
> where a.rhrqsid = 101 or a.rhrssid = 101
>
> Thanks,
> ViSolve DB Team
>
>
>
> - Original Message -
> From: "KMiller" <[EMAIL PROTECTED]>
> To:
> Sent: Tuesday, February 06, 2007 8:37 AM
> Subject: outer join quest
- Original Message -
From: "KMiller" <[EMAIL PROTECTED]>
To:
Sent: Tuesday, February 06, 2007 8:37 AM
Subject: outer join question
This query isn't what I want...
select a.rhrqid,a.rhrqsid,a.rhrssid,b.sid,b.rlsid
from rqhistory a left join relay b
on a.rhrqsid = 101 o
s all rows from 'a' regardless of the criteria 101
Any advice on how would I get only rows from 'a' that match 101 and any in
'b' that match if they exist?
-km
--
View this message in context:
http://www.nabble.com/outer-join-question-tf3178361.html#a8819711
Sent fr
Solved it with Union :)
SELECT images.id,images.name, playlist.title FROM images,playlist
WHERE playlist.image_id = images.id
UNION
SELECT images.id,images.name, media.title FROM images,media WHERE
media.image_id = images.id
ORDER BY id ASC
On Jun 23, 2006, at 6:44 PM, Graham Anderson wro
I am trying to build a query to
1) Get all the results from one table, 'images'
2) For each entry in the 'images' table, find the correct title from
the 'playlist' OR 'media' table where images.id = which_table.images_id
images table
id, filename
playlist table
title images_id
media table
t
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,.
Hi All,
I have a question for clearer brains than mine. I would like to join two
tables,. There may be many possible joins in table B to table A, but I only
want to join one row from B to table A - the row with the closest, but
lesser date.
TABLE A
Row Id date
1 46 3 Jan
7
re-send :
Hi,
you can use mysql variables :
set @total:=0;
select name,price,quantity, price*quantity as
subtotal,@total:[EMAIL PROTECTED]
from fruits;
++---+--+--+---+
| name | price | quantity | subtotal | @total:[EMAIL PROTECTED
On May 30, 2005, at 1:28 AM, [EMAIL PROTECTED] wrote:
you can just play :
set @total:=0;
select name,price,quantity, price*quantity as
subtotal,@total:[EMAIL PROTECTED]
from fruits;
select @total as "grand total";
works great. thanks very, very much.
- philip
--
MySQL General
Hi Philip,
what yoy called gand total is in @total for evevy row.
you can just play :
> > set @total:=0;
> > select name,price,quantity, price*quantity as
> > subtotal,@total:[EMAIL PROTECTED]
> > from fruits;
select @total as "grand total";
that's all !
Mathias
Selon Philip George <[
Hi,
you can use mysql variables :
set @total:=0;
select name,price,quantity, price*quantity as
subtotal,@total:[EMAIL PROTECTED]
from fruits;
++---+--+--+---+
| name | price | quantity | subtotal | @total:[EMAIL PROTECTED] |
++
On May 29, 2005, at 2:34 PM, [EMAIL PROTECTED] wrote:
you can use mysql variables :
set @total:=0;
select name,price,quantity, price*quantity as
subtotal,@total:[EMAIL PROTECTED]
from fruits;
++---+--+--
+---+
| name |
re-submitted :
re-send :
Hi,
you can use mysql variables :
set @total:=0;
select name,price,quantity, price*quantity as
subtotal,@total:[EMAIL PROTECTED]
from fruits;
++---+--+--+---+
| name | price | quantity | subtotal
actually, i've decided this is sort of a moot point, since i can do
this calculation in the client app.
no sql required.
thanks.
- philip
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
On 5/29/05, Philip George wrote:
> On 5/29/05, Philip George wrote:
>> On 5/29/05, Jochem van Dieten wrote:
>>> http://dev.mysql.com/doc/mysql/en/group-by-modifiers.html
>>
>> already read that. the join in my example is more complicated than
>> anything depicted on that page.
>>
>> please explai
The join is irrelevant. Your join returns a resultset and you can just
pretent that resultset is a single table:
SELECT field1, field2, field3
FROM (very complicated join) AS simpletable
GROUP BY ...
WITH ROLLUP
Just copy-pate your join into this and fix the fieldnames.
aaahhh
okay, i'm
http://dev.mysql.com/doc/mysql/en/group-by-modifiers.html
already read that. the join in my example is more complicated than
anything depicted on that page.
please explain.
actually i should say that there are no examples of SUM() or AVG() --
or any of the other GROUP BY functions -- th
On 5/29/05, Philip George wrote:
> On May 29, 2005, at 1:41 AM, Jochem van Dieten wrote:
>>
>> http://dev.mysql.com/doc/mysql/en/group-by-modifiers.html
>
> already read that. the join in my example is more complicated than
> anything depicted on that page.
The join is irrelevant. Your join retu
On May 29, 2005, at 1:41 AM, Jochem van Dieten wrote:
http://dev.mysql.com/doc/mysql/en/group-by-modifiers.html
already read that. the join in my example is more complicated than
anything depicted on that page.
please explain.
- philip
--
MySQL General Mailing List
For list archives:
On 5/29/05, Philip George <[EMAIL PROTECTED]> wrote:
>
> +--++---+--+
> | quantity | name | price | subtotal |
> +--++---+--+
> |1 | orange | 0.97 | 0.97 |
> |3 | pear | 1.09 | 3.27 |
> +--++-
t 11:36 PM, Philip George wrote:
is it okay to post a basic sql join question to this list?
if not, please point me to a list for these types of questions.
thanks.
- philip
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com
is it okay to post a basic sql join question to this list?
if not, please point me to a list for these types of questions.
thanks.
- philip
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
m: Rob Brooks [mailto:[EMAIL PROTECTED]
> Sent: 29 March 2005 15:57
> To: 'MySQL list'
> Subject: table join question
>
> Although I didn't find it in the docs anywhere, I know from experience
> that
> you cannot join more than 31 tables in 4.0.21
>
>
&g
Although I didn't find it in the docs anywhere, I know from experience that
you cannot join more than 31 tables in 4.0.21
I was wondering if anybody knew if this limit has changed in version 5
Thx
Rob
>
To: "Bill Easton" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, December 06, 2004 11:05 AM
Subject: Re: Yet another LEFT JOIN question
> > If you are using 4.1 or later, you could do a subquery to count the
> > clicks,
> > then left join that w
do a subquery to count the
clicks,
then left join that with the views.
HTH
Bill
From: Ron Gilbert <[EMAIL PROTECTED]>
Subject: Yet another LEFT JOIN question
Date: Sat, 4 Dec 2004 12:08:43 -0800
I have three tables, 'Ads' is a list of ads, 'Clicks' is a simple list
of
t the clicks,
then left join that with the views.
HTH
Bill
From: Ron Gilbert <[EMAIL PROTECTED]>
Subject: Yet another LEFT JOIN question
Date: Sat, 4 Dec 2004 12:08:43 -0800
I have three tables, 'Ads' is a list of ads, 'Clicks' is a simple list
of every time a Ad was
: Ron Gilbert [mailto:[EMAIL PROTECTED]
Sent: Saturday, December 04, 2004 2:09 PM
To: <[EMAIL PROTECTED]> <[EMAIL PROTECTED]>
Subject: Yet another LEFT JOIN question
I have three tables, 'Ads' is a list of ads, 'Clicks' is a simple list
of every time a Ad was
I have three tables, 'Ads' is a list of ads, 'Clicks' is a simple list
of every time a Ad was clicked on with the Ads ID, and 'Views' is a
simple list of views that ad got, with the Ads ID.
I am trying to SELECT a list of all the ads, with a count for clicks
and a count for views, but my LEFT J
- Original Message -
From: "Richard Reina" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, October 14, 2004 8:26 AM
Subject: left join question
> Is it possible to do two left joins involving three
> tables in one query?
>
> select a.id,
[snip]
Is it possible to do two left joins involving three
tables in one query?
select a.id, a.amount FROM t1
LEFT JOIN t2 ON (t1.id=t2.id)
then
LEFT JOIN t3 ON (t1.id=t3.id)
Is this even possible?
[/snip]
Yes, and the keys from table to table don't have to be the same, save
for each JOIN..
S
Is it possible to do two left joins involving three
tables in one query?
select a.id, a.amount FROM t1
LEFT JOIN t2 ON (t1.id=t2.id)
then
LEFT JOIN t3 ON (t1.id=t3.id)
Is this even possible?
Any help would be greatly appreciated.
Richard
--
MySQL General Mailing List
For list archives: http
Sorry, I meant to send this reply to the whole mailing list, not just to
Shawn.
Rhino
- Original Message -
From: "Rhino" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, September 14, 2004 2:18 PM
Subject: Re: update/join question..
> Okay, I st
Spruce Pine
"Rhino" <[EMAIL PROTECTED]> wrote on 09/14/2004 01:24:19 PM:
- Original Message -
From: "bruce" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, September 14, 2004 11:45 AM
Subject: update/join question..
> hi...
>
> a
Original Message -
> From: "bruce" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, September 14, 2004 11:45 AM
> Subject: update/join question..
>
>
> > hi...
> >
> > a question on how to do an update on a table that depen
Original Message -
> From: "bruce" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, September 14, 2004 11:45 AM
> Subject: update/join question..
>
>
> > hi...
> >
> > a question on how to do an update on a table that depen
- Original Message -
From: "bruce" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, September 14, 2004 11:45 AM
Subject: update/join question..
> hi...
>
> a question on how to do an update on a table that depends on 'left/right'
&g
hi...
a question on how to do an update on a table that depends on 'left/right'
joins with other tables...
i have the following select that works.
select
u1.urltype as type,
p1.fileID as fileID,
l1.process as process,
l1.status as status
from university_urlTBL as u1
right join parsefileTBL as p1
You only need to specify from tabel on the first table. Like this.
select
cattbl.name as cat, dogtbl.name as dog, birdtbl.name as bird
from dogtbl
left join cattbl on cattbl.id=dogtbl.catid
left join birdtbl on birdtbl.dogid=dogtbl.id;
-Eric
On Mon, 5 Jul 2004 09:28:02 -0700, bruce <[EMAIL PRO
On Monday 05 July 2004 12:28 pm, bruce wrote:
> my test tbls
>
> cattbl dogtbl birdtbl
> namename name
> id ---> catid ---> dogid
> id id
>
> so
> dogtbl.catid = cattbl.id
> birdtbl.dogid = dogtbl.id
>
> my question is how i can use "
my test tbls
cattbl dogtbl birdtbl
namename name
id ---> catid ---> dogid
id id
so
dogtbl.catid = cattbl.id
birdtbl.dogid = dogtbl.id
my question is how i can use "left joins" to produce the results set with the names of
all thre
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.o
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
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 query is working it
displays all the offers in the offer table regardless of the off
Hi -
I'm running 4.0.18, so I can't use subqueries. I need to run a query to get the sum
of costs from multiple tables for a given master table.
What I have right now which is clearly not going to work is:
SELECT conveyor.serial, SUM(conveyorsupport.cost), SUM(conveyoraccessories.cost) from
First, you database design. You don't need to separate actresses from
actors... Why do that? They are the same entity, a person, with only one
different attribute: the genre. So, you should join them in one single
table:
...
Actually, it is possible to be female and to be an Ac
Sorry, i meant "gender", not "genre".
-Forwarded Message-
First, you database design. You don't need to separate actresses from
actors... Why do that? They are the same entity, a person, with only one
different attribute: the genre. So, you should join them in one single
table:
Actors
==
First, you database design. You don't need to separate actresses from
actors... Why do that? They are the same entity, a person, with only one
different attribute: the genre. So, you should join them in one single
table:
Actors
==
act_id
name
genre ENUM('m','f')
Then, the table DVD. If we ma
> [EMAIL PROTECTED] wrote:
>>> DVD_Actor:
>>> dvd_ID REFERENCES DVD
>>> actor_ID REFERNCES Actor
>>
>> Is this how you setup a join table ?
>
> Yes.
>
>
>> what exactly is the references keyword ?
>
> It indicates a foreign key. Full syntax is something like:
> dvd_ID CONSTRAINT dvc_fk FOREIGN KEY
[EMAIL PROTECTED] wrote:
DVD_Actor:
dvd_ID REFERENCES DVD
actor_ID REFERNCES Actor
Is this how you setup a join table ?
Yes.
what exactly is the references keyword ?
It indicates a foreign key. Full syntax is something like:
dvd_ID CONSTRAINT dvc_fk FOREIGN KEY REFERENCES DVD (dvd_ID)
Read the ma
>
> DVD_Actor:
> dvd_ID REFERENCES DVD
> actor_ID REFERNCES Actor
>
Is this how you setup a join table ? what exactly is the references
keyword ?
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Bjorn Barton-Pye wrote:
I am using a test database to teach myself MYSQL and am using my DVD
collection as the subject. I have 3 tables in this example:
Actresses
===
actr_id
name
Actors
==
acto_id
name
DVD
==
Title
acto_id
actr_id
The acto_id and actr_id in the DVD table indicates the
> so soemthing like
>
> select * from dvd left join actresses actr on actr.actr_id=dvd.actr_id
> left join actors acto on acto.acto_id=dvd.acto_id or by dvd.title
>
>
totally forgot, to get a really good query especially when you use Innodb
it doesnt like null values on foreign keys, i'd setup a r
> So, can somebody please correct the following query (and explain the
> syntax) so that it will work please? (I haven't tried putting an outer
> join in it because I don't understand the syntax.)
>
> Select
> actr.name,
> acto.name,
> dvd.title
> from
> actresses actr,
>
> Hi,
>
> I'm just getting into MYSQL after nearly 12 years away from relational
> databases and I'm trying to blow the cobwebs away. So please bear with me
> if this is a simple question!
>
> I am using a test database to teach myself MYSQL and am using my DVD
> collection as the subject. I have
Hi,
I'm just getting into MYSQL after nearly 12 years away from relational
databases and I'm trying to blow the cobwebs away. So please bear with me if
this is a simple question!
I am using a test database to teach myself MYSQL and am using my DVD
collection as the subject. I have 3 tables in thi
Absolutely not. First, you have the overhead of maintaining the two
tables. Second, MySQL doesn't know that they are identical tables, so
it will try to cache both of them. On a self join, MySQL does know they
are identical, so it will only need to load the data into memory once.
If there is en
Hello,
I have a query that will be used alot on my website that involves a 42
million record table being self-joined. The primary table instance will be
limited by an index resulting in 1 to about 50,000 rows being selected, then
joined to the second instance of the table, which will retrieve
-
From: "D. R. Hansen"
Sent: Wednesday, October 15, 2003 3:39 PM
Subject: ALTER TABLE z ADD INDEX... Speed: Follow up to LEFT JOIN
question
> What amount of time is reasonable to expect for indexing an FK int
field on
> a simple table with about 30K records. It's running on my &
CPU or disk activity (and it's not from other things...),
then it's not hung. Just sit and wait. :-)
Matt
- Original Message -
From: "D. R. Hansen"
Sent: Wednesday, October 15, 2003 3:39 PM
Subject: ALTER TABLE z ADD INDEX... Speed: Follow up to LEFT JOIN
question
&
What amount of time is reasonable to expect for indexing an FK int field on
a simple table with about 30K records. It's running on my "learning"
machine -- an aging Pentium 5/133 box running RH 8 which is ordinarily
quite fast enough for my purposes. It's been running about six hours now,
and
Hi all;
I was given a query today of the following:
SELECT record_id, record_title,artist_name,label_name,record_catalog
FROM record_profile
LEFT JOIN artist_profile,label_profile
ON record_profile.artist_id = artist_profile.artist_id OR
record_profile.label_id = label_profile.label_id
GROUP BY r
Message -
From: 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 Mai
: [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
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]
.distance BETWEEN 1 and 99;
HTH
PB
- Original Message -
From: Anthony Ward
To: [EMAIL PROTECTED]
Sent: Thursday, June 05, 2003 1:17 PM
Subject: Join question
Hi,
I have posted a similar question, but can't find the answers. I'm sorry.
What i'm trying to do i
are looking for, otherwise let us know.
Regards,
Mike Hilyer
www.vbmysql.com
-Original Message-
From: Anthony Ward [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 05, 2003 12:17 PM
To: [EMAIL PROTECTED]
Subject: Join question
Hi,
I have posted a similar question, but can't fin
Hi,
I have posted a similar question, but can't find the answers. I'm sorry.
What i'm trying to do is that i have 3 tables
each has three columns and are indexed.
so I want to do something like select everything in 3 tables and display
only similar id.
Select id from table1 where table1.cl1 = 1
That does it! Thanks much.
Jim
On Saturday, March 29, 2003, at 06:14 PM, Bruce Feist wrote:
Jim Miller wrote:
I want to do a join and select of these tables that will give me all
the Entrants who did NOT enter contest 1 (i.e., Mary and Bill).
Try:
select entrant.name
from entrant le
Jim Miller wrote:
I want to do a join and select of these tables that will give me all
the Entrants who did NOT enter contest 1 (i.e., Mary and Bill).
Try:
select entrant.name
from entrant left join contestEntries
on entrant.id = contestEntries.entrant AND
contestEntries.ContestN
This is probably a real newbie question, but, since that's what I am...
Using MySQL 3.23, I have two tables, for instance:
ContestEntries: id, entrant, contestNumber, etc.
Entrant: id, name, etc.
There are multiple contests, and Entrants can enter as many as they
like. So, Entra
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 normaliz
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... c
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
menti
I have two tables.
tbl_reports and tbl_personnel
tbl_reports has these fields:
rep_id, person1, person2, person3, person 4
tbl_personnel has these fields:
per_id, fname, lname, mname
What is the way to get each report back once, and have the fname,
mname, and lname fields available to print
* Peter D Bethke
> Ok, in regards to my previous dilemma, I've gotten it to:
>
> SELECT
> golf_pick_periods.id,
> golf_pick_periods.period_name,
> golf_pick_periods.period_start_date,
> golf_pick_periods.period_end_date,
>
> COUNT(DISTINCT golf_events.id) AS num_events
Ok, in regards to my previous dilemma, I've gotten it to:
SELECT
golf_pick_periods.id,
golf_pick_periods.period_name,
golf_pick_periods.period_start_date,
golf_pick_periods.period_end_date,
COUNT(DISTINCT golf_events.id) AS num_events,
COUNT(golf_pla
Hi all,
I've got a mysql application that tracks golf events where players pick
winners. Each event is associated by date with a "pick period" (ie a
month).
I'm trying to get a COUNT() function to count all the picks by pick
period for a given player (in this case id = "1"). The following SQL
Hi all,
I've got a mysql application that tracks golf events where players pick
winners. Each event is associated by date with a "pick period" (ie a
month).
I'm trying to get a COUNT() function to count all the picks by pick
period for a given player (in this case id = "1"). The following SQL
; Tore.
>
> - Original Message -
> From: "Ramesh Pillai" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, February 27, 2003 10:36 PM
> Subject: Inner join question!
>
>
> > All,
> >
> > I have two tables like the fol
ursday, February 27, 2003 10:36 PM
Subject: Inner join question!
> All,
>
> I have two tables like the following
>
> table A
> date num1 num2 time
>
> table B
> date num1 num2 time
>
> When I run a query like the following
>
> select * from A as a inner j
All,
I have two tables like the following
table A
date num1 num2 time
table B
date num1 num2 time
When I run a query like the following
select * from A as a inner join B as b
on a.num1 = b.num1 and a.date=b.date and a.num2=b.num2
and a.time=b.time
I am getting the results repeated 4 times, co
r 'rootid' and then one
more self join to get 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: J
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> -
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| name2|
| 3 | 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:
>-
- 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 |
> -
* 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
logic.
> >
> > hth,
> > Arthur
> >
> > -Original Message-
> > From: Adam Randall [mailto:[EMAIL PROTECTED]]
> > Sent: Saturday, September 21, 2002 5:18 AM
> > To: [EMAIL PROTECTED]
> > Subject: Basic SQL join question
> >
>
ptember 24, 2002 12:46 PM
Subject: RE: Basic SQL join question
> > SELECT *
> > FROM Projects
> > INNER JOIN KeywordLink ON Projects.Id = KeywordLink.Pid
> > INNER JOIN Keywords KeywordLink.Kid = Keywords.Id
> > WHERE Keyword LIKE '%historical%' AND
>
" logic.
>
> hth,
> Arthur
>
> -Original Message-
> From: Adam Randall [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, September 21, 2002 5:18 AM
> To: [EMAIL PROTECTED]
> Subject: Basic SQL join question
>
>
> Okay, I've thought about this every way I
I prefer the clarity
obtained by keeping it in JOIN clauses and using the WHERE only to contain
the "include if" logic.
hth,
Arthur
-Original Message-
From: Adam Randall [mailto:[EMAIL PROTECTED]]
Sent: Saturday, September 21, 2002 5:18 AM
To: [EMAIL PROTECTED]
Subject: Basic
Okay, I've thought about this every way I can conceive of, but I
cannot figure out the sql query logic involved in joining three
tables together. Here is what I am trying to do:
I have three tables:
keywords
keywordlink
projects
keywords has these fields:
id
keyword
keywordlink has th
Peter Stöcker" <[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.
>>
> >> then you need to use left join for t2, but based only on these
> >> information
> >> I couldn't help you to implement this query (I don't know how to group by
> >> rows).
> >> Please, give more information about why do you need exactly this
1 - 100 of 133 matches
Mail list logo