Kamis, 26 Maret 2015

Re: [MS_AccessPros] Query: Compare first letter of "first name" in two tables

 

Jan-


You either have to do it in SQL or build a query that returns Left([FieldName], 1) and then use that in your matching query.  By doing it in SQL, I mean you have to do:

Table1 INNER JOIN Table2
ON Table1.LastName = Table2.LastName
  AND Left(Table1.FirstName, 1) = Left(Table2.LastName, 1)
  AND …

John Viescas, Author
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications 
SQL Queries for Mere Mortals 
(Paris, France)




On Mar 26, 2015, at 9:27 PM, jan.hertzsch@gmail.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:


I swear I saw a way to do this but I cannot find it now.


I want to compare Last name, house number, street name, and first letter of first name for two tables.


I am looking to get


Smith, Jeff 301 Anystreet and

Smith, Jeffrey, 301 Anystreet.


I am certain the command is left([fieldname],1) but I am not sure where it goes in the query.


Thanks for the help.


__._,_.___

Posted by: John Viescas <johnv@msn.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (2)

.

__,_._,___

Tidak ada komentar:

Posting Komentar