Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

match Pattern in first table

$
0
0

Hi all,

    I have a two table .
   on based of first table I need to compare second table . like for any elphabets if table 1
   data exist then output will be that elpabets.like ,

table 1

1
1
2

table2

1    A
1    A
2    A
1    B
2    B
1    C
1    C
3    C
3    C
1    C
1    D
1    D
1    D
2    D
2    E

so as alpahbet A all number are present in both table same as for D.

so answer will be

A

D

Please help me to write a query.

Thanks


Viewing all articles
Browse latest Browse all 23857

Trending Articles



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