Query to take backup of tables randomly
declare @sqlquery nvarchar(4000)
set @sqlquery = N'select * into niku.[CMN_SEQ_CMN_EXCHANGE_RATES_bk_' + convert(varchar(8),GETDATE(),112) + '] from niku.[CMN_SEQ_CMN_EXCHANGE_RATES]'
print @sqlquery
execute
sp_executesql @sqlquery
No comments:
Post a Comment