ciao, ho la necessità di eseguire la seguente query su un database db2 -> (mainframe as400):
codice:
Select CAMPO1,CAMPO2 From LIB.FILE where CAMPO1
not in (select CAMPO1 from LIB.FILE order by CAMPO1 fetch first 10 rows only )
Order By CAMPO1 fetch first 30 rows only
sostituendo il fetch first... con un top in sql server ed anche access la query funziona normalmente, mentre su db2 no..
nota: DB2 non supporta TOP quindi fetch first N rows only è la soluzione migliore.
Il problema dovrebbe essere proprio la subquery e quel "not in"..
Qualcuno sà se posso modificare questa query in modo da farla funzionare anche sotto db2 ottenendo lo stesso risultato ?