Issue with creating a VIEW inside a Stored Procedure : I needed to Parse a JSON string from a column in a SQL Server 2008 r2 table, so I used 2 Views and 3 tables and several stepped queries. Everything worked. Now after populating several databases I need to allow for Triggers to be placed on a specific table. Since only a Stored Procedure can be called from a Trigger I was converting everything into an SP. All went well except for a CREATE VIEW statement. I've wrapped that into EXEC but I'm still getting a syntax error regarding an unclosed quote. I've tried several different ways of enclosing keywords but nothing worked. Here's a snippet of the code:   

EXEC ('If object_ID(''vw_BuildLookup01'',''V'') IS NOT NULL
            DROP VIEW vw_BuildLookup01;')

EXEC ('If object_ID(''vw_BuildLookup02'',''V'') IS NOT NULL
            DROP VIEW vw_BuildLookup02;')
            
EXEC ('CREATE VIEW [dbo].[vw_BuildLookup01]  
AS  
SELECT DISTINCT t.tblKey, t.Name AS MetricTypesName, m.tblKey AS MetricKey, m.Name AS MetricName, m.MetricLimitedValues, f.Value  
FROM  OccurrenceMetricFacts f  
INNER JOIN Metrics m ON f.MetricKey = m.tblKey   
INNER JOIN MetricTypes t ON m.MetricTypeKey = t.tblKey   
WHERE  m.MetricLimitedValues IS NOT NULL AND t.DeletedDate IS NULL AND f.Value IS NOT NULL
')

EXEC ('CREATE VIEW [dbo].[vw_BuildLookup02]  
AS  
SELECT v.tblKey, v.MetricTypesName, v.MetricKey, v.MetricName,  
REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(v.MetricLimitedValues, '"Name":"', ''),'","Value"', ''),'{', ''), '}',''),'[', ''), ']', '') AS MetricLimitedValues, v.Value  
FROM vw_BuildLookup01 v  
INNER JOIN MetricTypes t ON t.tblKey = v.tblKey  
WHERE t.DeletedDate IS NULL  
')


The syntax error is in the CREATE VIEW [dbo].[vw_BuildLookup02] after the nested REPLACE commands the '"Name":"' has the dreaded red squiggly line underneath. I've read too many articles, rewrote the query too many ways, I need help. Thanks in advance.