Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Cursor Loop How to

Cursor Loop How to

From: Paul <paulvon_at_my-deja.com>
Date: Mon, 19 Jul 1999 20:38:54 GMT
Message-ID: <7n02cs$7cs$1@nnrp1.deja.com>


I have a table that has a time stamp stored as a text field. The problem is that I have several hundred that are the same.

I know who to find them.
SELECT Time_Stamp FROM Time_Table WHERE Create_Time = '1200000000'

How to I find them and then add +1 to each of them progressively so that they all the records have a different time stamp.

I do want to see the records that would be changed before I run the actual updating statement, so I want to use a select statement.

I have know that the cursor when using a fetch statement needs a select into to work. This approach does not let me see what the changes would be prior to running the SQL.

I have rights to update records in an existing table, but can't create a new table.

Example:
Original Revised
1200000000 1200000000
1200000000 1200000001
1200000000 1200000002
1200000000 1200000003
1200000000 1200000004

Help Me Please.

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't. Received on Mon Jul 19 1999 - 15:38:54 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US