I have an AS400 Linked Server, and I'm trying to run some queries and get some sample sets, but I can't figure out how to limit the number of rows returned.
I tried:
SELECT * FROM OPENQUERY(LINKED, 'SELECT * FROM LINKED.APLUS.CUS WHERE CMSUSP != ''S'' LIMIT 100')
and
SELECT * FROM OPENQUERY(LINKED, 'SELECT TOP(100) * FROM LINKED.APLUS.CUS WHERE CMSUSP != ''S'' ')
I know I can add the TOP to the SELECT FROM OPENQUERY, but I'm trying to not have the AS400 return 100k rows when I only need 100.