Cat TypeB TypeC TypeD TypeE ---------------------------------------------------------------- 40 5 3 6 4 41 . . .Where the numbers 5,3, etc are the number of records I need of each Cat and Type and will change periodically but I can't predict what they will be; the 'B','C','D','E' are the difficulty letters (DiffLet). But I need to be able to pull x number of records based on Cat and DiffLet
Select top 5 from (filename) where Cat = '40' and DiffLet = 'B' Union (Select top 3 from (filename) where Cat = '40' and DiffLet = 'C' Union ...but is it possible to say
Select top TestFrameWork.TypeB from (filename) where Cat = '40' and DiffLet = 'B'?