List:General Discussion« Previous MessageNext Message »
From:Kevin Murphy Date:October 29 2007 11:36pm
Subject:Replace on Join
View as plain text  
I'm trying to do a join on two pieces of data that are not quite  
exactly the same. Basic story, I have 2 tables (output from 2  
mainframes) in MySQL where one table has our email addresses as  
@wncc.edu (our old name) and the other has it as @wnc.edu (our new  
name). So here is an abbreviated version of the query that is trying  
to match them, and it doesn't work. Any suggestions?

SELECT * FROM schedule
LEFT JOIN directory ON
(	REPLACE('@wncc.edu','@wnc.edu',schedule.email) = directory.email	)

-- 
Kevin Murphy
Webmaster: Information and Marketing Services
Western Nevada College
www.wnc.edu
775-445-3326

P.S. Please note that my e-mail and website address have changed from  
wncc.edu to wnc.edu.



Thread
Replace on JoinKevin Murphy30 Oct
  • Re: Replace on JoinPeter Brawley30 Oct