Home » SQL & PL/SQL » SQL & PL/SQL » Need logic of the procedure
Need logic of the procedure [message #227152] Tue, 27 March 2007 07:55 Go to next message
bhoite_amol83
Messages: 110
Registered: June 2005
Location: Pune
Senior Member
Hi All,
I have a table which has 20 rows.

The table has the following data .

3 columns . 3rd column is empty.

ID Type Action
40 COUPLE
41 LOADING
42 UNLOADING
43 CLEANING
44 UNCOUPLE
45 LOADING
46 UNLOADING
47 LOADING
48 UNLOADING
49 LOADING
50 UNLOADING
51 LOADING
52 UNLOADING
53 LOADING
54 UNLOADING
55 LOADING
56 UNLOADING
57 LOADING
58 UNLOADING
59 COUPLE


I need to write a procedure which will be having the following logic.

1...If Type = 'LOADING' then
Previous COUPLE type updated with Action = 'Pickup'
2...If Type = 'UNLOADING' then
Next UNCOUPLE type updated with Action = 'Depot'
3...If Type = 'UNLOADING' then
Next CLEANING type updated with Action = 'Clean'


Any type of help will be appreciated.

Waiting for reply.

Thanks,

[Updated on: Tue, 27 March 2007 07:56]

Report message to a moderator

Re: Need logic of the procedure [message #227177 is a reply to message #227152] Tue, 27 March 2007 08:22 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
bhoite_amol83 wrote on Tue, 27 March 2007 14:55
Any type of help will be appreciated.

Ok, here is how I will help you:
You start writing the procedure or update statement or whatever it is you need.
Then you compile/run it.
If it does not do what you want it to, re-examine your logic.
If you are stuck, then come back explaining what you did, what result you got and what result exactly you want.
This way, you will learn and we don't have to write your code.
Trust me, this is a bigger help then you might consider it.
Re: Need logic of the procedure [message #227190 is a reply to message #227152] Tue, 27 March 2007 08:41 Go to previous message
bhoite_amol83
Messages: 110
Registered: June 2005
Location: Pune
Senior Member
Thanks for your help.
Previous Topic: ORA-01480: trailing null missing from STR bind value
Next Topic: ORA-01033: ORACLE intialization or shutdown in progress
Goto Forum:
  


Current Time: Sun Dec 04 06:25:17 CST 2016

Total time taken to generate the page: 0.24466 seconds