Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2004
    Posts
    31

    Unanswered: How to use a vriable in DTS Package

    Hello,

    I have set up a simple DTS Package to copy a table (backup) in my database. I have specified the name of the table, however I want the naming of the new table to be dynamic and use the current timestamp, but I am not sure if and how I can define a variable and use it in the package.

    Any thoughts? Do you need any more info?

    Thanks.

    Rodney

  2. #2
    Join Date
    Mar 2004
    Posts
    31

    More info

    Here is my SQL for the new table creation. I want the following name to be dynamic "CON_D_EmployeeInfo_backup20040526" Maybe use "CON_D_EmployeeInfo_{CurrentDateTime}".

    CREATE TABLE [ancosalesdm].[dbo].[CON_D_EmployeeInfo_backup20040526] (
    [EmployeeID] varchar (15) NULL,
    [EmployeeTitle] varchar (46) NULL,
    [EmployeePosition] varchar (46) NULL,
    [EmployeeCostCenter] varchar (4) NULL,
    [EmployeeDivision] varchar (256) NOT NULL,
    [EmployeeStatusFlag] varchar (3) NULL,
    [curr_ind] varchar (1) NOT NULL,
    [last_up_date] datetime NOT NULL,
    [eff_start_date] datetime NOT NULL,
    [eff_end_date] datetime NULL,
    [key] int NOT NULL
    )

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •