Link to home
Start Free TrialLog in
Avatar of Gary Harper
Gary HarperFlag for United States of America

asked on

The query contains more than one unnamed or duplicate field name

In SSRS when trying to refresh my dataset I get the error message "The query contains more than one unnamed or duplicate field name".  If I run the stored procedure it executes fine.  However the issue just exists in SSRS.  I have listed my column names and I do not see the duplicate field name.  Is there a query or steps I can take to identify what field name is causing the problem?  Please advise.
SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
>"The query contains more than one unnamed or duplicate field name"
SSRS requires that every column name be unique within a data set.

>If I run the stored procedure it executes fine.
Maybe, but do you have more than one column without a name, or two columns with the same name?  This will often happen if you have any SELECT *'s, or Customers.CustomerID and Orders.CustomerID, both can be named CustomerID.

>I have listed my column names and I do not see the duplicate field name.
Just for kicks and giggles, post your query into this question, using a code block.
I'm guessing that our awesome mind-reading skills used to interpret 'the query' resulted in a solution here in the first couple of comments.  

In case it didn't thoughm just for kicks and giggles, post your query into this question, using a code block.
Avatar of Gary Harper

ASKER

The column names had greater than and less than symbols in the name.  SSRS interpreted this as underscores.  So the field names appeared to be the same.