Your technology certification is waiting. Enroll in Cloud Class ®
select 'select * into xxxlib.'+name+' from dbo.'+name+';'
where schema_id = 1
and convert(char(8), create_date, 112) = '20130103'
Open in new window
--CREATE SCHEMA TestSchema
DECLARE @SQL VARCHAR(MAX)
DECLARE @Change VARCHAR(MAX)
set @Change = 'ALTER SCHEMA TestSchema TRANSFER dbo.['
@SQL = COALESCE(@SQL + @Change + [name] + '] ', @Change + [name] + '] ')
--create_date = Your condition
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
From novice to tech pro — start learning today.
Premium members can enroll in this course at no extra cost.