How do you perform a
Select top N * from as400table
type query against an as400/db2 database
Wouldn't it be easier to limit the result instead? Bellow is in order by date and I take the top result
SELECT banana_equipment_id FROM new_banana_equipment WHERE banana_code=0000001 ORDER BY banana_date DESC LIMIT 1;