linking tables with unmatched fields

  • Thread starter Thread starter tachia
  • Start date Start date
T

tachia

I am comparing data from two tables and wanted to create
a field in one table that will only search by the first 6
or 8 characters, because we have some records that are
spelled differently between the two tables. For example,
table1 may say ABC Company and table2 may say ABC Co.

Please let me know how I can create a new col. with just
the first few characters and compare to the other table.

Thanks!
 
Assuming that you have added the new column to your table,
the sql for its population is along the lines of
UPDATE YourTable SET yourNewColumn = Left(yourOldColumn,
noOfChars)

You will have to change YourTable, yourNewColumn and
YourOldColumn to suit your app. noOfChars is a numeric for
the number of characters you want in the new new column.

Hope This Helps
Gerald Stanley MCSD
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top