sql server - how to create a table name dynamically based on the week -
After
I have a backup table called pipelinebackupWk ##
, where is trying to create Am ##
The current calendar is viewed from a fiscal calendar table. For example: Backup table this week will be called pipelineback10, next week it will be called pipelinebackup 12. . I need weeks to manually change it every week so that my SSIS package runs automatically to change
I am currently using this: in selection *
< Where is the ACTUAL_DATE = convert (Datetime, Convert (nvarchar (20)), from pre-> (select 'Pipelinebackup' + 'WK' + RIGHT (CAST (AS VARCHAR (2)), 2 WEEK_OF_QUARTER [dbo] [Fiscal_calendar] Text "itemprop =" text "> getdate () - 5101)) table12
to
Comments
Post a Comment