Re: outer join question

2007-02-05 Thread KMiller
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

Re: outer join question

2007-02-05 Thread ViSolve DB Team
- 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

outer join question

2007-02-05 Thread KMiller
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

Re: Outer join question

2004-01-20 Thread Craig A. Finseth
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

[Fwd: Re: Outer join question]

2004-01-20 Thread Diana Soares
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 ==

Re: Outer join question

2004-01-20 Thread Diana Soares
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

Re: Outer join question

2004-01-19 Thread daniel
> [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

Re: Outer join question

2004-01-19 Thread Jochem van Dieten
[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

Re: Outer join question

2004-01-19 Thread daniel
> > 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]

Re: Outer join question

2004-01-19 Thread Jochem van Dieten
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

Re: Outer join question

2004-01-19 Thread daniel
> 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

Re: Outer join question

2004-01-19 Thread daniel
> 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, >

Outer join question

2004-01-19 Thread Bjorn Barton-Pye
> 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

Outer join question

2004-01-19 Thread Bjorn Barton-Pye
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

RE: A LEFT OUTER JOIN question.

2002-06-16 Thread Peter Normann
ect: RE: A LEFT OUTER JOIN question. Hi Peter, Thanks a lot - that does the trick! Incredibly quick response :) Ian > -Original Message- > From: Peter Normann [mailto:[EMAIL PROTECTED]] > Sent: 16 June 2002 17:06 > To: 'mySQL list'; [EMAIL PROTECTED] > Subj

RE: A LEFT OUTER JOIN question.

2002-06-16 Thread mySQL list
Hi Peter, Thanks a lot - that does the trick! Incredibly quick response :) Ian > -Original Message- > From: Peter Normann [mailto:[EMAIL PROTECTED]] > Sent: 16 June 2002 17:06 > To: 'mySQL list'; [EMAIL PROTECTED] > Subject: RE: A LEFT OUTER JOIN question

RE: A LEFT OUTER JOIN question.

2002-06-16 Thread Peter Normann
Try SELECT Items.ItemID, Stuff.info FROM Items LEFT JOIN Stuff ON (Items.ItemID = Stuff.ItemID && (type=0 || type IS NULL)); Peter Normann -Original Message- From: mySQL list [mailto:[EMAIL PROTECTED]] Sent: 16. juni 2002 17:59 To: [EMAIL PROTECTED] Subject: A LEFT OU

A LEFT OUTER JOIN question.

2002-06-16 Thread mySQL list
I have two tables, 'items' and 'stuff'. Items has a primary key of itemid. and looksmlike this ItemID other fields... 1 ... 2 3 4 5 6 Stuff contains something like this: ItemID type info 1 0blah blah 2 0something 2 1... 3 1... I want a query w

Re: outer join question

2001-11-30 Thread Steve Werby
"Harlan Feinstein" <[EMAIL PROTECTED]> wrote: > I've joined them an SQL statement that looks like this: > > select val, status > from A > left outer join B on val=id; > > What I'd LIKE is a 90-row result set, with the "status" field from table B > when there was data available. What I'm getting i

outer join question

2001-11-30 Thread Harlan Feinstein
I'm having difficulty doing a LEFT OUTER JOIN, and was hoping someone could shed a little light on what I'm doing: Table A has one column, "val", that's an integer. There are 90 records, with values of "val" from 1-90. Looks like this: val --- 1 2 . . . 90 Table B is more sparse, with 2 colum