If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
linking tables with unmatched fields
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! |
#2
|
|||
|
|||
linking tables with unmatched fields
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 -----Original Message----- 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! . |
Thread Tools | |
Display Modes | |
|
|