tag:blogger.com,1999:blog-2644834396723399240.post2850861685596619595..comments2024-03-28T04:20:46.548-04:00Comments on Faisal's Technical Blog: Reporting Services error: An item with the same key has already been addedFaisalhttp://www.blogger.com/profile/17505806562342802428noreply@blogger.comBlogger7125tag:blogger.com,1999:blog-2644834396723399240.post-10724873399642751632020-11-10T07:13:59.202-05:002020-11-10T07:13:59.202-05:00LOL... CompanyNumber is duplicated.LOL... CompanyNumber is duplicated.Anonymoushttps://www.blogger.com/profile/13664271803840914128noreply@blogger.comtag:blogger.com,1999:blog-2644834396723399240.post-51692860872795331312018-09-27T10:51:23.072-04:002018-09-27T10:51:23.072-04:00Way to point it out and actually help the guyWay to point it out and actually help the guyAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-2644834396723399240.post-44199408578503654172018-02-06T10:50:06.141-05:002018-02-06T10:50:06.141-05:00You do have duplicate field names. You do have duplicate field names. Christian Henryhttps://www.blogger.com/profile/03251895651714738327noreply@blogger.comtag:blogger.com,1999:blog-2644834396723399240.post-13243240149324206682017-01-04T11:27:56.297-05:002017-01-04T11:27:56.297-05:00I'm having a similar problem here in Power Que...I'm having a similar problem here in Power Query in Excel connecting to a DB2 for i via ODBC.<br />My problem is also with a data set from Case statements, but I've also created a copy of the dataset in a temp table, still getting the error. No duplicate column names, returns fine in other applications. Any ideas? Here is the query. Any ideas?<br /><br />SELECT <br /> CONO AS "CompanyNumber",<br /> TRTP AS "TransactionType",<br /> TKEN AS "TokenUsedToUniquelyIdentifyRecord",<br /> -- SSEQ AS "SplitTransactionSequenceNumber",<br /> INVN AS "InvoiceNumber",<br /> CHRFILE_MM.IDATEUSA(INDE) AS "InvoiceDate",<br /> ORDR AS "ManufacturingOrderNumber",<br /> SHSQ AS "ShipmentSequence",<br /> CUNO AS "CustomerNumber",<br /> CUCL AS "CustomerClass",<br /> SLCD AS "SalesCode",<br /> SRNO AS "SalesrepNumber",<br /> TRNO AS "TerritoryNumber",<br /> ITNO AS "ItemNumber",<br /> ITCL AS "ItemClass",<br /> ITAC AS "ItemAccountingClass",<br /> WHID AS "WarehouseCode",<br /> SCRF AS "SpecialChargeReference",<br /> TXCD AS "TaxCode",<br /> TRAM AS "Amount",<br /> CHGC AS "Company",<br /> TRIM(CHGA) AS "GL_Account",<br /> ICHF AS "InvalidFlag",<br /> 'Charge' AS "AmountType",<br /> TRIM(CHGC)||'-'||TRIM(CHGA)||'-1' AS "GL_AccountID"<br /> FROM AMFLIB.OEITXN<br /> UNION ALL<br /> SELECT <br /> CONO AS "CompanyNumber",<br /> TRTP AS "TransactionType",<br /> TKEN AS "TokenUsedToUniquelyIdentifyRecord",<br /> -- SSEQ AS "SplitTransactionSequenceNumber",<br /> INVN AS "InvoiceNumber",<br /> CHRFILE_MM.IDATEUSA(INDE) AS "InvoiceDate",<br /> ORDR AS "ManufacturingOrderNumber",<br /> SHSQ AS "ShipmentSequence",<br /> CUNO AS "CustomerNumber",<br /> CUCL AS "CustomerClass",<br /> SLCD AS "SalesCode",<br /> SRNO AS "SalesrepNumber",<br /> TRNO AS "TerritoryNumber",<br /> ITNO AS "ItemNumber",<br /> ITCL AS "ItemClass",<br /> ITAC AS "ItemAccountingClass",<br /> WHID AS "WarehouseCode",<br /> SCRF AS "SpecialChargeReference",<br /> TXCD AS "TaxCode",<br /> -TRAM AS "Amount",<br /> OFFC AS "Company",<br /> TRIM(OFFA) AS "GL_Account",<br /> IOFF AS "InvalidFlag",<br /> 'Offset' AS "AmountType",<br /> TRIM(OFFC)||'-'||TRIM(OFFA)||'-1' AS "GL_AccountID"<br /> FROM AMFLIB.OEITXNAnonymoushttps://www.blogger.com/profile/14791139893857815144noreply@blogger.comtag:blogger.com,1999:blog-2644834396723399240.post-6706326350545720272014-02-12T14:32:20.912-05:002014-02-12T14:32:20.912-05:00I have the exact same problem. I just spent the m...I have the exact same problem. I just spent the morning recreating an SSIS package, because MS would not let me edit it.<br /><br />I just spent an hour fighting with this, and I have to recreate the entire report, apparently.<br /><br />Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-2644834396723399240.post-1286420979989842422013-08-21T19:58:47.054-04:002013-08-21T19:58:47.054-04:00Hey Mark,
Would it be OK if I ask you to post the ...Hey Mark,<br />Would it be OK if I ask you to post the query here?Faisalhttps://www.blogger.com/profile/17505806562342802428noreply@blogger.comtag:blogger.com,1999:blog-2644834396723399240.post-4830300671985482452013-08-21T14:59:40.997-04:002013-08-21T14:59:40.997-04:00I checked for duplicated column names -
Using SQL...I checked for duplicated column names - <br />Using SQL 2008 R2 - Have a fairly large query 626 lines that joins 4 tables and has many CASE statements. In the SQL Query windows the query runs to completion and returns 50 columns of data. When attempting to cut and paste the query into a dataset in SSRS and produce a list of fields I get the error "An item with the same key has already been added". I checked to make sure there were no duplicate column names.<br /><br />I created a stored procedure and was able to create the dataset but was not able to get a field list - same error. The stored procedures executes in the designer window as does the query.<br /><br />Any help is greatly appreciated.<br /><br />Anonymoushttps://www.blogger.com/profile/11435957829241583113noreply@blogger.com