Error: Could not use view or function because of binding errors

To correct the wrong column name using the SSMS tool, right click the table with issue in the "View" folder then click "Design" and correct it from there, make sure to save when you click close.


It sounds like the view was created and then one of the underlying tables was changed. I.e., ProductCategoryL2Name no longer exists or was renamed. You can try this to get the view's definition, but the sys tables might be locked down. Your best bet is to go talk to whoever owns the database and ask them to fix it (which can be quite a rabbit hole in large organizations or on consulting gigs).

SELECT sm.definition
FROM [YourDB].sys.sql_modules AS sm  
    JOIN [YourDB].sys.objects AS o 
        ON sm.object_id = o.object_id  
WHERE sm.object_id = OBJECT_ID('YourDB.dbo.ViewName')