DTS- coying column with no field title

  • It's a simple example that is easier to describe with an example of a simple package:

    Conection1: Progress Database table

                  |

                  V

    Transform Data Task that issues

        SELECT table1.field1, 

               table1.field2, 

               'dbname' 

        FROM ProgressDatabase.table1

                  |

                  V

    Connection2: SQL database table that has the fields

        field1

       field2

       db

     I have several of these SELECT statements going for several different Source databases all gonig into the same SQL Server.

    The problem: In the Transform Data Task, on the Tranformations tab, only the first two fields map from the Source to the Destination table. The Source grid has no entry for the hard-coded value 'dbname'. Thus, it does not get mapped to the SQL table's db field, which ends up containing nulls. And when I try to manually map all Source fields (including the hardcoded value which shows as a blank) to all Destination fields, it gives me an error: Please specify a valid name and ordinal values for the Column. I cannot find this error in google. Important: Progress will not let me use an alias in the SELECT statement! This would probably solve the problem if the source database was SQL Server. Is there something I'm overlooking or any advice, I would appreciate it.

    Thanks!

     


    smv929

  • Just add an alias name to the column, then you'll be able to map it:

    Transform Data Task that issues

        SELECT table1.field1, 

               table1.field2, 

               'dbname' as field3

        FROM ProgressDatabase.table1

    Aunt Kathi Data Platform MVP
    Author of Expert T-SQL Window Functions
    Simple-Talk Editor

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

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