I'm trying to create a view from a table on MS SQL Server 2005, using some of its data to populate the columns of the view... a simplified example would be a table keeping records of the stage a user has unlocked, something like: