SSIS Tutorial Part 38-How to Create Monthly Archive Folders in SSIS Package

In this video of SQL Server Integration Services(SSIS) Tutorial, you will learn how to create monthly archive folders with Month Name in SSIS Package.
The video also explains below

How to create and Use Variables in SSIS Package
What are expressions in SSIS Package
How to write expressions on variables in SSIS Package
How to use year function in SQL Server Integration Package
How to use Month function in Expressions in SSIS Package
How to get Month Name from Month Number in SSIS Package
How to use File System Task to Create new folder in SSIS Package

Here are the expressions used in Demo Video how to create folder with month name in SSIS Package.
MONTH(getdate()) == 1 ? "Jan" :
MONTH(getdate()) == 2 ? "Feb" :
MONTH(getdate()) == 3 ? "Mar" :
MONTH(getdate()) == 4 ? "Apr" :
MONTH(getdate()) == 5 ? "May" :
MONTH(getdate()) == 6 ? "Jun" :
MONTH(getdate()) == 7 ? "Jul" :
MONTH(getdate()) == 8 ? "Aug" :
MONTH(getdate()) == 9 ? "Sep" :
MONTH(getdate()) == 10 ? "Oct" :
MONTH(getdate()) == 11 ? "Nov" :"Dec"




1 comment:

  1. If you want the full month name use this:

    MONTH(getdate()) == 1 ? "January" :
    MONTH(getdate()) == 2 ? "February" :
    MONTH(getdate()) == 3 ? "March" :
    MONTH(getdate()) == 4 ? "April" :
    MONTH(getdate()) == 5 ? "May" :
    MONTH(getdate()) == 6 ? "June" :
    MONTH(getdate()) == 7 ? "July" :
    MONTH(getdate()) == 8 ? "August" :
    MONTH(getdate()) == 9 ? "September" :
    MONTH(getdate()) == 10 ? "October" :
    MONTH(getdate()) == 11 ? "November" :"December"

    ReplyDelete