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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Data Error

Status
Not open for further replies.

JezBullen

Programmer
Dec 11, 2001
23
GB
Hi,

I've got a database set up for printing different letters depending on which one the user selects. The letters display the customers address (taken from the customer table) as well as other details (taken from the warranty table)

For some reason, when the customer code "C001" (a valid customer) is entered, the system stops working, because this is stored as "C001 C001" in the Warranty table and the join part of my query doesn't match up

Does anyone have any suggestions - I can't think why this particular field value should pose such a problem

Thanks in advance
Jez
 
Sounds like someone goofed...

UPDATE warranty SET customCode = "C001" WHERE customerCode = "C001 C001"

OR, more genericly

UPDATE warranty SET customCode = left(customerCode, inStr(customerCode," ") -1) WHERE inStr(customerCode," ") > 0
Get the Best Answers! faq333-2924
Is this an asp FAQ? faq333-3048

mikewolf@tst-us.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top