Is there a way to get the statement that created a view for an existing view in SQL Server 2008? I thought there was a stored procedure or some metadata that had this data, but
Have you had a look at sp_helptext?
sp_helptext 'dbo.name_of_view'
SQL SERVER – Stored Procedure to display code (text) of Stored Procedure, Trigger, View or Object