A column is missing from the Select Top 1000 Rows result I have a view in my database. When I am applying the Select Top 1000 Rows command to it in the Object Explorer in SSMS, the resulting script is missing one column, as you can see in the picture below (the missing column is BranchCode).



I have applied the sp_refreshview system stored procedure in an attempt to fix the problem, but it didn't help.

How is this possible and how can I resolve this?
First I would do as Andriy M said in the comments, try doing a refresh on the view.

If that doesn't work, drop and recreate to a new window. I know the "have you tried turning it off and on again" answer isn't cool. But it's a pretty good catch all.