View previous topic :: View next topic
|
Author |
Message |
lanand1985
New User
Joined: 05 Jun 2007 Posts: 3 Location: chennai
|
|
|
|
Hi,
In database I have rows like below.
990000
999154
999155
....
Due to a bug, instead of 990000 getting incremented, the value changed to 999154 and is getting incremented.
My requirement is to fetch the value that is less than 999154 and increment by 1. that is 999001, 999002, etc..
REPOSITION gives the latest row inserted 999155. I am looking for REPOSITION with WHERE clause syntax and examples.
i.e. FOCUS equivalent of the below DB2 query
SELECT ID from table where ID < 999000 |
|
Back to top |
|
|
lanand1985
New User
Joined: 05 Jun 2007 Posts: 3 Location: chennai
|
|
|
|
Hi,
Please help about this FOCUS query. Not much materials/examples to refer.
Thanks. |
|
Back to top |
|
|
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
Hi,
You might for one time fix the data by using query like
SELECT ID from table where ID >= 999000 AND ID < 999155
and then Modify your actual query
Also check this link for FOCUS documentation |
|
Back to top |
|
|
lanand1985
New User
Joined: 05 Jun 2007 Posts: 3 Location: chennai
|
|
|
|
I am still struggling to fix this.
REPOSITION SHIP_MEMO_ID ;
NEXT SHIP_MEMO_ID
WHERE SHIP_MEMO_ID LT '499999'
The above query is throwing FOC401 error. Can anyone help me with FOCUS equivalent of the below query.
SELECT SHIP_MEMO_ID FROM TABLE
WHERE SHIP_MEMO_ID < 499999 |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
What does the Focus manual say about the error. It is a Focus error so the message is not in the IBM manuals and most people will not have access to the Focus manuals. |
|
Back to top |
|
|
|