Midrange News for the IBM i Community


Posted by: Chris Proctor
Programmer Analyst
Columbia Sports Company
Portland, OR
UPDATE number of rows in a stored procedure?
has no ratings.
Published: 27 Sep 2011
Revised: 23 Jan 2013 - 2187 days ago
Last viewed on: 15 Jan 2019 (4094 views) 

Using IBM i? Need to create Excel, CSV, HTML, JSON, PDF, SPOOL reports? Learn more about the fastest and least expensive tool for the job: SQL iQuery.

UPDATE number of rows in a stored procedure? Published by: Chris Proctor on 27 Sep 2011 view comments(1)

In a stored procedure I need to update 100 rows in a file with a batch number if the batch number is currently 0. It doesn't look like having "fetch 100 rows only" is valid on an UPDATE statement, so is there another way that I can accomplish the same thing?

Here's what my statement currently looks like:

UPDATE cscedipoh              
SET    ehbtch = v_batch_number
where  ehbtch = 0             
FETCH  first 100 rows only;   

Any suggestions would be greatly appreciated!

Return to midrangenews.com home page.
Sort Ascend | Descend

COMMENTS