View previous topic :: View next topic
|
Author |
Message |
satish kanamarlapudi
New User
Joined: 23 Jul 2008 Posts: 29 Location: Little Rock - Arkansas
|
|
|
|
My requirement is that,
In one of the query where it does select one row everytime is giving -811 and so it means there are multiple records for the entry, since the production cycle running under this query is out of my subsystem i cannot view the table. but i want to fetch the last row this query is using, for first row we give 'FIRST ROW ONLY' . Similarly is thr any option for picking the last row.
Please let me know ur views n suggestions on the same.
Thx,
satish |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
Using the data that may be returned from a select with a failure SQL code is not a good idea, a new version of DB2 may not return the same or any data. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
I'd suggest using a cursor rather than an unpredictable query.
You might "trick" it with a FIRST and an ORDER BY DESC. . . |
|
Back to top |
|
|
|