Vik_NJ wrote:Скорее всего работать не будет, но может попробовать добавить к Вашему selectу
union
SELECT ID1, Description from table1 where 1=2
( union тоже дублирующие записи должен убирать )
UNION может дать ту же ошибку
http://www.experts-exchange.com/Databases/Microsoft_SQL_Server/Q_20829157.html
Q:
SELECT * FROM vw_performance_evenement_1
UNION
SELECT * FROM vw_performance_evenement_2
gives this error:
"The text, ntext, or image data type cannot be selected as DISTINCT."
But each of the separate queries don't give any problem.
There isn't any use of "DISTINCT" in the views used.
A:
A little bit of explaination now :
select 1 union select 2
is the same than
select distinct * from (select1 union all select2)
Note :
union and union all are not equivalent
if the two querie's results are not logically exclusive (ie if their intersection is not null), you migth get duplicate records