Dynamically set column names in DTS from .htm file

  • I'm trying to write a DTS package that'll nightly import data from an automated email.  The email contains a small table of data, ala an MS Word table, and I've found that if you save the email as a .htm that DTS will ignore all info on the page other than the table.  The issue is that the table column names change nightly since they have dates in them, causing DTS to force a remapping on the transformations page.  I may be going about this all wrong.  I couldn't find a way to force DTS to automatically remap (the number of columns and type of data stays the same, only the names change), so I tried creating a variable and passing it into the sql statement, sort of like a dynamic sql statement, but DTS always reads the variable as a value rather than a column name, such as below.  Any suggestions?   The result set for the below always has "productDate_12/28/2005" in the output for column2 (and of course I want the actual data since this is the column name).

     

    select productName as col1, ? as col2

    from table1

    (? = productDate_12/28/2005)

  • Never mind!  Finally got it...

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply