I have an issue that has justjust started to happen. This view converts four columns from VARCHAR to INT when the view is run. Prior to a few days ago the view was fine and worked perfectly. I'm not a DB man myself but I do know that you can't accomplish this unless the values in the column you want to convert are digits in the first place. I have been through the table and simply cannot see anything that is anything other than 0 or 1. We don't have any empty data in these fields, they don't contain anything other than 0 or 1's, I have completed select statements against each of the four data point but to no avail.
All I get is:
Msg 8114, Level 16, State 5, Line 2
Error converting data type nvarchar to bigint.
At the bottom of the screen it says it brought back or at least got to row 603 before this error appeared. Not sure if that means it went through the original table up to row 603 then crashed. I have been in to the table this view get's it data from and there is nothing wrong with this row.
Any ideas on how I could see what's really happening would be much appreciated!!
CAST(nslDcs_1.AON_Y AS INT) AS AON_Y, CAST(nslDcs_1.AON_N AS INT) AS AON_N, CAST(nslDcs_1.AWH_Y AS INT) AS AWH_Y, CAST(nslDcs_1.AWH_N AS INT)
AS AWH_N, nslDcs_1.date, nslDcs_1.Tref, nslDcs_1.vendorCode, dbo.country.countryName, dbo.city.cityName, dbo.products.ItemName, dbo.products.[Bin Location],
dbo.city.regionCode, dbo.products.Category, dbo.store.storeName, dbo.store.storeType, dbo.storedirectory.accountCode, nslDcs_1.countryCode, nslDcs_1.cityCode,
nslDcs_1.storeCode, dbo.products.[UPC Code]
FROM dbo.nslDCS AS nslDcs_1 LEFT OUTER JOIN
dbo.store ON nslDcs_1.countryCode = dbo.store.countryCode AND nslDcs_1.cityCode = dbo.store.cityCode AND nslDcs_1.storeType = dbo.store.storeType AND
nslDcs_1.storeCode = dbo.store.storeCode AND nslDcs_1.storeType = dbo.store.storeType AND nslDcs_1.vendorCode = dbo.store.vendorCode LEFT OUTER JOIN
dbo.city ON dbo.store.countryCode = dbo.city.countryCode AND dbo.store.cityCode = dbo.city.cityCode LEFT OUTER JOIN
dbo.country ON dbo.city.countryCode = dbo.country.countryCode LEFT OUTER JOIN
dbo.products ON nslDcs_1.Tref = dbo.products.TREF LEFT OUTER JOIN
dbo.storedirectory ON dbo.store.countryCode = dbo.storedirectory.countryCode AND dbo.store.storeCode = dbo.storedirectory.storeCode AND
dbo.store.cityCode = dbo.storedirectory.cityCode AND dbo.store.storeType = dbo.storedirectory.storeType