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

Return ONLY first record

$
0
0

If I run this:

Select*

From security_hist 

where item='CUSIP' or item ='SEDOL'and GVKEY = '006066'

I get 84,780 records returned.

 

 

If I run this:

Select*

From security_hist 

where(item='sedol' or item ='cusip')and GVKEY = '006066'

I get 5 records returned.

 

What I just realized is that I get 5 identical GVKEY records. I really want just one!!  How can I pick the first record that is found, and ignore the others?

 

 


Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.


Viewing all articles
Browse latest Browse all 23857

Trending Articles



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