all groups > sql server reporting services > december 2004 >
You're in the

sql server reporting services

group:

How to distinguish fields with the same name from two linked table


How to distinguish fields with the same name from two linked table Victor
12/6/2004 1:45:03 PM
sql server reporting services: I have this query:

SELECT *
FROM PMA_Employee left outer JOIN
PMA_EmployeeAllergies ON PMA_Employee.EmployeeID =
PMA_EmployeeAllergies.EmployeeID

Note, that here are two fields with EmployeeID name. When I try to create
report in VS, I get this error:

More than one field in the data set ‘Acudata’ has the name ‘EmployeeID’.
Field names must be unique within a data set.

Data fields can be not unique, but field names should be unique according to
doc.

Is it RS problem or I do something wrong?

I am developing reporting tool based on RS and don't know how to distinguish
fields with the same names from different tables when they are in the same
dataset. If they would be in different datasets, I would use this:

=First(Fields!EmployeeID .Value, "DataSet3")

Can somebody from Microsoft help me please? Or anybody with good advise?

Thanks

Re: How to distinguish fields with the same name from two linked t Victor
12/6/2004 1:59:05 PM
Thank you Jeff.
Definetely I would be able to bypass this problem if it would be just for
one report. But in AdHoc tool that I develop, user can choose whatever he
wants.

Here I am trying not to bypass this problem but to find a solution.

[quoted text, click to view]
Re: How to distinguish fields with the same name from two linked table Jeff A. Stucker
12/6/2004 2:50:11 PM
Instead of using SELECT * (which is almost never a good idea), select each
field individually, and set an alias for the duplicate names. You can do
this all in the query-by-example (QBE) grid.

--
'(' Jeff A. Stucker
\

Business Intelligence
www.criadvantage.com
--------------------------------------
[quoted text, click to view]

AddThis Social Bookmark Button