Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

convert text containg ( '.' ' -' )

Status
Not open for further replies.

reden55

Programmer
Joined
May 14, 2002
Messages
6
Location
US
I have two parts tables and am attempting to set a value in table A where the parts# match. The part#'s can contain either a "." or a "-". When I try to create an update query, I get the following error,"The expression that you entered has an invalid data value". The fields are "text" in both db's. How can I "convert" the values into text?
Thank you



 
Hi, The following worked for me:

Table1 field aa: 1.12
2-23
field ab: The field to contain values.

Table2 field bc: 1.12
2-23
3.0A

sql for update query:

UPDATE Table2 INNER JOIN Table1 ON Table2.bc = Table1.aa SET Table1.ab = IIf([aa]=[bc],1,0);

-updates field ab to 1 if the items match, 0 - no match.

Hope that helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top