![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
|
I am using db2 v7.x. Command center on my PC, odbc to a database on the MF. I have a simple select, select * from ps_ledger_adb_mtd, and I only want to see the first 10 rows, not all 5200 plus rows. I tried using this, select * from ps_ledger_adb_mtd fetch first 10 rows only, and got this error message: SQL0199N The use of the reserved word "FETCH" following "" is not valid. Expected tokens may include: "FOR WITH ORDER UNION EXCEPT QUERYNO OPTIMIZE ". SQLSTATE=42601 |
#2
| |||
| |||
|
#3
| |||
| |||
|
|
here's what I get: ------------------------------ Command Entered ------------------------------ select * from ( select x.*, rownumber() over () as rn from ps_ledger_adb_mtd x ) where rn < 10 ; ----------------------------------------------------------------------------- SQL0104N An unexpected token "(" was found following "". Expected tokens may include: ", FROM INTO ". SQLSTATE=42601 |
![]() |
| Thread Tools | |
| Display Modes | |
| |