I'm new to Sql but I understand the basics and maybe a bit intermediate. I wrote this query to pull some information involving 3 tables dbo.NewFamNbrs$, dbo.CGIItemMaster and dbo.CGIFamilyMaster. In addition I want to perform an update statement to update column dbo.CGIItemMaster.FamilyIDX with the information of dbo.CGIFamilyMaster.IDX. I also know that truncation is indicating that I'm trying to insert data into a field not large enough. So I performed a len() function on the both columns and order by desc and they both came up with 4 as being the max. I'm out of ideas any help will be appreciated.Query:SELECT a.PART, a.Family, b.FamilyIDX, c.FamilyID, c.IDXFROM dbo.NewFamNbrs$ a LEFT OUTER JOIN dbo.CGIFamilyMaster c ON a.Family = c.FamilyID LEFT OUTER JOIN dbo.CGIItemMaster b ON a.PART = b.PART
Results of query: PART Family FamilyIDX FamilyID IDX000127233 TF01 1468 TF01 506000129880 TF01 1468 TF01 506003110 MET06 1468 MET06 1915
UPDATE STATEMENT:begin tranupdate dbo.CGIItemMasterset FamilyIDX=c.IDXFROM dbo.NewFamNbrs$ a LEFT OUTER JOIN CGIFamilyMaster c ON a.Family = c.FamilyID LEFT OUTER JOIN dbo.CGIItemMaster b ON a.PART = b.PART