|
|
|
Re: How to Update a column from the other column? [message #325125 is a reply to message #325071] |
Thu, 05 June 2008 01:45 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
svloke
Messages: 23 Registered: May 2007 Location: Mumbai
|
Junior Member |
|
|
An equipment is shuttled from one location to the other. The report regarding history of shutteling is required. The parent table is having date and location of its installation as two columns.
Using explicit cursor I plan to inser location, date of installation, date of de-installation in the columns c1(varchar2 100), c2(date) and c3(date) of new temp table. The installation date at 1st onward location will be de-installation date for the previous location.
How can it be done? is it possible to do it without using an explicit cursor?
svloke
[Updated on: Thu, 05 June 2008 01:46] Report message to a moderator
|
|
|
|
|
|
Re: How to Update a column from the other column? [message #325245 is a reply to message #325206] |
Thu, 05 June 2008 06:33 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
![](/forum/images/custom_avatars/72104.gif) |
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
On the contrary, everything I meant to say is visible. But it seems that your are incapable to understand it. OK, I'll try once again:- Go to Oracle documentation
- Choose SQL Reference Guide book
- Go to "Functions" chapter
- Research use of LAG and LEAD functions
- Test them on simple examples (Scott's schema)
- Apply your new knowledge to your task
- Return here if you have a question about a specific problem
- If necessary, include CREATE TABLE and INSERT INTO sample data scripts
- Post what you've done and explain why it doesn't work as expected
- Properly format code and use [code] tags to preserve formatting
(It's much better now, isn't it?)
|
|
|