July 2, 2014 at 3:19 am
Hello,
We're getting
Msg 1013, Level 16, State 1, Line 1
The objects "MYTEST2.TEST" and "mytest.TEST" in the FROM clause have the same exposed names. Use correlation names to distinguish them.
Wanted: use of fully qualified names is allowed without having to alias them
One workaround is changing compatibility mode to 80.
Is there another (startup flag?)
Reason for no alias: MS Reportbuilder doesn't provide them when building queries
Thanks in advance.
CREATE SCHEMA MYTEST;
go
CREATE SCHEMA MYTEST2;
go
CREATE TABLE MYTEST.TEST
(
id int
);
CREATE TABLE MYTEST2.TEST
(
mynum int
);
insert into MYTEST.TEST (id) values(1);
insert into MYTEST2.TEST(mynum) values(1);
select id
from mytest.TEST
inner join MYTEST2.TEST
on mytest.test.id=MYTEST2.test.mynum;
July 2, 2014 at 6:00 am
I took your sample code and ran it in a test database.
Then, I build a test report, defined a datasource for the test database and a dataset definition using it. For the query I changed your query slightly:
SELECT t1.id
FROM MYTEST.TEST AS t1
INNER JOIN MYTEST2.TEST AS t2
ON t1.id = t2.mynum
The test report ran as expected. The key was to alias the two source tables.
July 3, 2014 at 8:27 am
Thanks for the response.
I was hoping on some magic as the graphical query designer in Report Builder 3 doesn't alias tables nor accepts modifications in the sql.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply