RE: Join issues

2010-04-21 Thread Lin Yu
It looks like that your first join clause are inconsistent in itself, that is, you declared it for tables A & B, but actually used A & C instead: ts_software RIGHT JOIN t_computers ON t_softwareassoc.SoftwareAssocSoftwareID = ts_software.SoftwareID -Original Message- From: Weydson Lima [m

RE: basic SQL question

2003-08-05 Thread Lin Yu
>> How I can get the right one? Depending on your goal, which was not given here. I recall in my earlier career, in the computing center there was a banner saying: "I wish they could sell this computer: It never does what I want it to do, only what I tell it to do." The result you got was intrins

RE: Nested SELECT statements problem

2003-08-02 Thread Lin Yu
One problem is that you have quoted your "sub-query", which makes it to return a constant string. Another problem I saw in your code is that you used the same aliases for tables in the query and in the sub-query. In such case, the SQL parser would take all of them to refer to the same table, prob

RE: SELECT problem

2003-07-29 Thread Lin Yu
Hi, Rachel, It seems most people have missed this message. Since you didn't give enough information in your question, in order to answer your question, I need to make up some assumptions, which might or might not be correct :-( Suppose the same favsub could appear in either or both tabl

RE: Deleting duplicating records

2003-07-29 Thread Lin Yu
Karam If your installed MySQL version supports sub-query, try this: Delete your_table t where (t.email, t.version) not in ( select s.email, min(s.version) from your_table s group by s.email ) Hope this helps. Lin -Original Message- From: Karam Cha

RE: Deleting duplicating records

2003-07-28 Thread Lin Yu
Try this: Delete your_table t Where t.version > min(t.version) Group by t.email Lin -Original Message- From: Karam Chand [mailto:[EMAIL PROTECTED] Sent: Monday, July 28, 2003 11:27 AM To: Jeff McKeon; [EMAIL PROTECTED] Subject: RE: Deleting duplicating recor

RE: Design decision

2003-07-28 Thread Lin Yu
Lian, Between your design solutions (1) and (3), you need to decide, from the logical business requirement, whether the nature of the relationship between user and group is one-to-many (a group may have many users, and each user may belong to exactly one group) or many-to-many (a group may have ma

RE: SQL Help...

2003-07-24 Thread Lin Yu
Nick, As you stated, your priority field datatype is "varchar", with possible values "Hi", "Medium" and "Low", as opposed to being integers. The use of max function, as suggested by some colleagues without knowing exactly the datatype would work correctly only on columns of datatype integer. In yo

Q: DB creation

2003-07-23 Thread Lin Yu
Situation: I just installed MySQL 4.0.14 on my Windows XP, the very first time. The server daemon seems started running well. Now, I want to create a new database. However, in the WinMySqlAdmin 1.4 tool, upon right clicking, in the dropdown list there are no "create database, create ..." items, o