MySQL Forums
Forum List  »  General

Re: Query help
Posted by: Jason Collison
Date: January 15, 2005 12:36PM

The error you got was likely because 1) you need the table name prefixed in the SELECT just like in your WHERE clause. And 2) You need to specify both tables after the FROM. So this adjusted query will "work":

SELECT mailings.Cust_Name FROM mailings, master
WHERE mailings.Cust_Name=master.Cust_Name

On a design note, however, I would avoid doing joins on strings such as this. The full customer name should only appear in one table, and could be tied together using a numeric value to do the join.

Options: ReplyQuote


Subject
Written By
Posted
January 15, 2005 12:54AM
Re: Query help
January 15, 2005 12:36PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.