[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2143
  • Last Modified:

Informix Order by in Stored Procedure Update Cursor

Hi,
   Does anyone know if I can order rows that are placed in an update cursor from a select statement.  My code is
in a stored procedure. Example is below.

FOREACH upd_curs FOR SELECT column1,column2 INTO var1,var2 FROM myTable Order by 1;


Thanks
0
Arundel_Castle
Asked:
Arundel_Castle
1 Solution
 
boriskalavskyCommented:
Yes, you should be able to:
      FOREACH SELECT c1 INTO i FROM tab order by 1
            INSERT INTO tab2 VALUES (i);
      END FOREACH

http://www.dbcenter.cise.ufl.edu/triggerman/InfoShelf/sqls/02.fm.html#125314
0
 
Arundel_CastleAuthor Commented:
Sorry I took so long. Thanks for the answer.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now