I have two tables with ZipCodes in them and they are the same in each table. The column datatypes are the same and the same size as well. Does anyone know why my view isn’t being updated correct? It always shows NULL For the second table. Thanks
USE [DB]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER VIEW [dbo].[myview]
AS
SELECT dbo.Table1.Division, dbo.Table1.RegionName AS Region, dbo.Table1.AccountDir AS RegionManager, dbo.Table2.key,
dbo.Table2.ZipCode, dbo.Table3.ZipCity, dbo.Table3.ZipCounty, dbo.Table3.ZipState
FROM dbo.Table2 LEFT OUTER JOIN
dbo.Table1 ON dbo.Table2.key = dbo.Table1.key LEFT OUTER JOIN
dbo.Table3 ON dbo.Table2.ZipCode = dbo.Table3.ZipCode
ZipCodes are just like this 05412. Normal 5 digit zips.
It was a formatting issue with the csv being uploaded with the bulk load command… I imported it into an access db and then imported it into my sql db with no issues. 0dd