Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
akpaga
Constraint Violating Yak Guru
331 Posts |
Posted - 2015-02-26 : 11:39:10
|
Hi friends,I have a table called Customer with fields as followsCustomer_ID Customer_name Customer_Qname1 John HA-12 Carepenter VG-33 Tim V1ANd then i have a table called CustomerDataRecordID Customer_Client_ID Price1 HA-1-22r4 8.0 2 VG-3-RR67 9.0 3 V1-fgr4 10.0I now have added a new field Customer_ID to the CustomerData to map the Cutsomer_ID field data from Customer Table. But the problem is I have to map them by comapring CustomerQname field and Customer_Client_ID(CustomerQname+some string).So basically i want to get the CustomerQname and compare with the Customer_Client_ID and if there is match populate my Customer_Id field of the CustomerData table. How can i achieve this partial comaparison ..Thank You |
|
djj55
Constraint Violating Yak Guru
352 Posts |
Posted - 2015-02-26 : 14:32:58
|
could you compare Customer_Qname to LEFT(Customer_Client_ID, LEN(Customer_Qname))djj |
|
|
|
|
|