Showing posts with label take table backup with todays date. Show all posts
Showing posts with label take table backup with todays date. Show all posts

Monday, 26 November 2012

Query to takequtomated table backup


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