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

How to do this select?

$
0
0

I have a table with one of the columnw being LabOrg.

I want to pull back 1000 records (or all if less than 1000) for each distinct laborg in the table all at once.

So if tableA looks like this:

LabOrg         OtherData

A                   stuff

AA                 stuff

B                   stuff

C                   stuff

My result set would contain 1000 records for laborg A, 1000 for AA, 1000 for B and so on.

Thanks


Mike Rutledge


Viewing all articles
Browse latest Browse all 23857

Trending Articles



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