I like Charles' train of thought, but after reading your post I'm thinking
something as simple as this might work for you:
set RECCNT = RECCNT + 1 where date1 > 20080000
All that example above does is bump RECCNT by 1 for every record that
matches your selection criteria (WHERE clause).
Would that suffice?
If not, can you give another example of existing RECCNT value and what you'd
like to set it to?
Celebrating 11-Years of SQL Performance Excellence on IBM i5/OS and OS/400
Subject: Updating by row count in Interactive SQL
Any suggestions on how you would do this in interactive SQL?
counter = counter + 1
set RECCNT = counter
where date1 > 20080000
An example would be most appreciated. The above, obviously does not work.
The only two options I have in this case are SQL and UPDDTA record by
BTW, every now and then I see answers posted asking a good question -
why would you want to do that? - the hard way? I suspect it is usually
because we are working on a box with restrictions, no developer
When we are in our native environment these questions (with simple
answers in another tool) don't pop up.