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

t sql query urgent pls

$
0
0

hi ,

i have data like this

cola colb colc

123 12 a

123 12  b

123 12 a

124 12  d

124 12  f

we have to loop throuhj all the values associated with colc for each cola and colb, if all the values are not in (a and b), then i return the distinct on cola  and colb

in the above instnace , the retruned value is 124 12, since none of the values in colc are in (a and b)

pls help, tx


Viewing all articles
Browse latest Browse all 23857

Trending Articles



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