View previous topic :: View next topic
|
Author |
Message |
thiagold
New User
Joined: 29 Nov 2005 Posts: 3
|
|
|
|
Im trying to retrive N rows from a select, but in DB2 version 6. It not alowed to use the "FETCH FIRST N ROWS ONLY" sintax and it do not recognize the ROWID or ROW_NUMBER() columns ou functions. I need do this in one SQL request. Another case is that should run without using any PK or similars. Example:
SQL Server: "SELECT TOP N * FROM (select * from table_a)"
Oracle: "SELECT * FROM (select * from table_a) ta WHERE ta.rownum <= N
Best regards |
|
Back to top |
|
|
DavidatK
Active Member
Joined: 22 Nov 2005 Posts: 700 Location: Troy, Michigan USA
|
|
|
|
This was always a problem before V7. I think you are out of luck on this one.
Anyone have any suggestions?
If you find the solution, Please post it. |
|
Back to top |
|
|
khamarutheen
Active Member
Joined: 23 Aug 2005 Posts: 677 Location: NJ
|
|
|
|
Hi frnd,
Whether ur shop wont update the versions r not??? bcz v r not clear with ur requirement... so without that RowNum,Fetch facility the only way is Primary key.. u too locked that.. then how my frnd..????? |
|
Back to top |
|
|
|