locked
The package contains two objects with the duplicate name of "xxxx" and "xxxx" RRS feed

  • Question

  • hi all,

    ssis2008 almost drive me crazy.

    i opened a dataflow task by double click, then i dragged and dropped an OLE DB source component, a data conversion component and a "union all" component. i configured the source so it had an output column named "BRANCH_CODE".

    after connecting the source and the conversion component, i set up the conversion as following:

    input column:BRANCH_CODE

    output column:BRANCH_CODE

    type:DT_STR   (the original type is DT_WSTR)

    after i connected the union component to the conversion, there was a small red cross on the union component,

    indicating that The package contains two objects with the duplicate name of "BRANCH_CODE(153)" and "BRANCH_CODE(99)".

     

    and i could not open the advanced editor of the union component.

     

    any suggestions will be greatly appreciated.

     

    Andrew


    Andrew Chen
    Interested in BI related technologies
    Monday, October 11, 2010 12:19 PM

All replies

  • quicky: Find your DTSX file and create a backup. Then edit in notepad. Seek for BRANCH_CODE with an id 153 and chage it to anything carefully.
    BI and ERP Senior Consultant @ Nexum Bogazici
    If it is, Please dont forget to mark as answered or at least vote as helpful if the post helps you in any ways.
    Visit: ssisnedir.com/blog Follow Me
    Monday, October 11, 2010 12:40 PM
  • Delete the Union All Component and re-add it. Just curious, what is the other input of the Union All? It takes two inputs and works like a UNION statement in T-SQL. If you only have one Source leading to a Derived Column, and no other 'source' there's no need for a Union All.

    When you DO configure the Union All, don't add columns by defining them in the left-most column, Instead, on a new row, select one of the available Input Columns from one of the Inputs and let SSIS create the Output column to match it.

    When you use a Union All, the continuity of an Input column is stopped (and probably combined with another Input column of the same type from another Source) and that data continues on under a NEW column of the same data type.

    Hope this helps.


    Todd C - MSCTS SQL Server 2005 - Please mark posts as answered where appropriate.
    Monday, October 11, 2010 12:42 PM
  • Hi Todd,

    deleting and re-adding the Union All Component doesn't work.

    i 'm curious on which situation  can this error occur?

    btw, i was going to add another source, however, this error tripped me.

     

    Thanks.


    Andrew Chen
    Interested in BI related technologies
    Monday, October 11, 2010 1:46 PM
  • Hi Onur,

    any material on the structure of the dtsx file?

    thanks

     

     


    Andrew Chen
    Interested in BI related technologies
    Monday, October 11, 2010 1:58 PM
  • Ah, sorry. Your problem is in the Data Conversion. You cannot CHANGE a data type of a column once it is added to the pipeline. When using the Data Conversion transform, it is better to add a new column of the new data type and NOT try to overlay the original column with new metadata.

    Try this: Delete the Data Conversion transform and re-add it. Click the box for BRANCH_CODE and in the lower section, give this item a name such as "str_BRANCH_CODE" or use the default of "Copy of BRANCH_CODE". Set the Data Type for this new column appropriately. Now connect it to the Union All. Now, when selecting columns in the UNION ALL transform, you can select "str_BRANCH_CODE" as an input, an possibly add an corresponding column from another input. AT THIS POINT, you can re-name the Output of this column back to BRANCH_CODE or to anthing else you want. The Original BRANCH_CODE (my guess is it was DT_WSTR unicode type?) will cease to exist below the Union All transform and your new str_BRANCH_CODE data column, renamed, will continue.

     

    HTH.


    Todd C - MSCTS SQL Server 2005 - Please mark posts as answered where appropriate.
    Monday, October 11, 2010 2:14 PM
  • hi Todd,

    thanks for ur quick response.

    in many other Data flow task, when using data conversion transofrms, i always gave the new columns the same names as the original ones,  and it did not cause problems, the subsequent component could distinct them as they took corresponding components' names as prefixes(eg, SRC.BRANCH_CODE,DCNV.BRANCH_CODE).

    i doubt whether copying and pasting some components/task could cause this error.

     

    Thanks.


    Andrew Chen
    Interested in BI related technologies
    Monday, October 11, 2010 3:05 PM
  • Yeah, it's weird.

    In other packages I named same as input. It managed to give them a different name coming out of the task.

    This time error appeared. When I give them another name. union all does not complaint about having to inputs with same name.

    Tuesday, November 19, 2019 9:05 AM