Quantcast
Channel: SQL Server Database Engine forum
Viewing all articles
Browse latest Browse all 12554

query to eliminate the duplicates records coming from two tables result in sqlserver

$
0
0

Hi All,

I have requirement to eliminate the duplicate records that comes out by using below query:

The query is as follows:

select distinct ColumnA,convert(varchar(max) ,ColumnB )as ColumnB1 from TableA
unionall
select distinct ColumnA,convert(varchar(max) ,ColumnB )as ColumnB1 FROM TableB

Can anyone help me on this?

Regards


sudha


Viewing all articles
Browse latest Browse all 12554

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>