What is correct syntax for SQL for Maxrecords in OS400/DB2?
We have a process automatically generating SQL code. However, our iSeries doesn't recognise the code it generates for maxrecords.
Here are the examples of what I mean.
The DB2 database seems happy with
SELECT I1PHON,I1ACC,I1ACC1, FROM "TRNGDATA1"."OICRT1" FETCH FIRST 1 ROWS ONLY
However the standard sql code generated automatically to do the same reads:
SELECT I1PHON,I1ACC,I1ACC1, FROM "TRNGDATA1"."OICRT1? maxrecords=-1)
This doesn't get accepted by iseries.
Does anyone have some ideas how I can get round this?
Sorry, I'm not an SQL guru!
Can you find out whether the DB2 database handles this parameter?