Re: SQL design

2005-01-20 Thread pooly
Hello, I don't have any chance with this topic :-) I usually follow that list with my professional email, and there are often good advices on normalization or sql design. Do you need any more details ? Thanks for your help [EMAIL PROTECTED] écrit: > > Hello, > > I've got a DB design issue h

Re: SQL design/query question

2002-07-03 Thread Chris Griffin
Well maybe I sould map this out more clearly... members +---+-+--+-+-++ | Field | Type| Null | Key | Default | Extra | +---+-+--+-+-++ | rowid | int(11)

RE: SQL design/query question

2002-07-02 Thread Cal Evans
Right list. What you want is an outer join. Very simple example: person --- personID === name region === attendance --- attendanceID === date personID FK into person eventid FK into event === Select event.date, person.name, (attendance.personID is null) as present from attendanc

Re: SQL design/query question

2002-07-02 Thread Jed Verity
You need a LEFT JOIN. Read about it here: http://www.w3schools.com/sql/sql_join.asp Go down to the "LEFT JOIN" section. HTH, Jed I liked it when Chris Griffin wrote this to me: > If this is not the right list for this please direct me to the proper > list. > > I have a table of name/address

RE: SQL/Design -- how to use sub entities/type discriminators ?

2002-01-14 Thread Rick Emery
CORRECTION: SELECT user.*,graduser.* FROM graduser RIGHT JOIN user USING(userid); SELECT user.*,profuser.* FROM profuser RIGHT JOIN user USING(userid); -Original Message- From: Rick Emery [mailto:[EMAIL PROTECTED]] Sent: Monday, January 14, 2002 3:52 PM To: '[EMAIL PROTECTED]' Subject:

RE: SQL/Design -- how to use sub entities/type discriminators ?

2002-01-14 Thread Rick Emery
You don't really have to do the two searches and if-then-else. You can use joins to first get all grads, then a join to get all profs. SELECT user.*,graduser.* FROM graduser LEFT JOIN user USING(userid); SELECT user.*,profuser.* FROM profuser LEFT JOIN user USING(userid); These assume USERIDs a