Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. jongunnar

    fetch first 5 rows only for update

    For the record - my problem remains unsolved. Anyone got any further input?
  2. jongunnar

    fetch first 5 rows only for update

    I actually want to first get 5 items from a table and then update those items.
  3. jongunnar

    fetch first 5 rows only for update

    Thanks for the continued help, Dimandja. You originally suggested the sql statement UPDATE a-table SET b-field = some-value WHERE c-field IN (SELECT c-field FROM a-table WHERE d-field IS other-value FETCH FIRST 5 ROWS ONLY) What I fear will happen with this query (and I might be wrong) is...
  4. jongunnar

    fetch first 5 rows only for update

    I'm not sure I understand you here.
  5. jongunnar

    fetch first 5 rows only for update

    Thanks, but what I really want is doing FETCH FIRST 5 ROWS ONLY FOR UPDATE and that doesn't work for DB2. If I skip the FOR UPDATE clause, I run into concurrency problems.
  6. jongunnar

    fetch first 5 rows only for update

    No, I think that the syntax "top 5" is illegal for DB2. I also belive that this is the Oracle equivalant of DB2's "fetch first 5 rows only". But thanks anyway.
  7. jongunnar

    fetch first 5 rows only for update

    Hi. I want to write a query that returns a set of rows from a table. All those rows should fulfill several requirements, as specified by the query's where clause, AND I want to get exactly 5 (or X) number of rows AND I want to set an UPDATE lock on those rows. I don't care if those 5 rows are...

Part and Inventory Search

Back
Top