Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to use MAXRECS in query

Status
Not open for further replies.

Mbroad

Programmer
Feb 26, 2004
49
US
Hi--I am running the following "every nth record" selection query, but would like to also add a MAXRECS ability to this query. how and where do I do this?

select A.*
into SOS_KEYNUMBER2
from SOS_SECOND_RUN A
inner join SOS_TEMP B on A.SID = B.SID
where B.seq % 5 = 0

Thanks--Mark

Government Coder Mark
 
The TOP predicate may be what you are looking for.

Ex.

Select top 10 * from table

This will only return 10 records.

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top