Improve company productivity with a Business Account.Sign Up
DECLARE @TableName AS sysname
DECLARE @MySelect AS VARCHAR(MAX)
SET @MySelect = 'SELECT * FROM ' + @TableName
Open in new window
DECLARE @alterview NVARCHAR(MAX) = N'ALTER VIEW Query AS SELECT M.number, M.Created FROM ? M;';
DECLARE @tablename sysname;
SET @tablename = ( SELECT TOP 1
FROM sys.tables T
WHERE T.name LIKE 'Metric____'
ORDER BY T.name DESC
SET @alterview = REPLACE(@alterview, '?', @tablename);
Are you ready to take your data science career to the next step, or break into data science? With Springboard’s Data Science Career Track, you’ll master data science topics, have personalized career guidance, weekly calls with a data science expert, and a job guarantee.
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.