Home » SQL & PL/SQL » SQL & PL/SQL » cursors
cursors [message #245168] Fri, 15 June 2007 06:36 Go to next message
aditiC
Messages: 38
Registered: February 2006
Location: INDIA
Member
Hi All,

I have two cursors one having list of devices & other having list of numbers in the format below:

cursor1

cpeid portid portnumber
1 1 1
1 2 2
2 3 1
2 4 2

cursor2
voip number
1234
1235
1236


i need to update the dn column such that
cpeid portid portnumber dn
1 1 1 1234
1 2 2 1235
2 3 1 1236
2 4 2 1234

presently i am using cursor for loops but it is not giving the desired results. please suggest something.


Re: cursors [message #245171 is a reply to message #245168] Fri, 15 June 2007 06:41 Go to previous messageGo to next message
Cthulhu
Messages: 381
Registered: September 2006
Location: UK
Senior Member
Are you just assigning the numbers randomly to the other table ? You don't seem to have any sort of joining key.

[Updated on: Fri, 15 June 2007 06:42]

Report message to a moderator

Re: cursors [message #245185 is a reply to message #245168] Fri, 15 June 2007 07:22 Go to previous message
Michel Cadot
Messages: 64133
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Post the functional needs not how you want to implement it.
How you sure you need cursors?

Regards
Michel
Previous Topic: Audit Trail
Next Topic: Format a query
Goto Forum:
  


Current Time: Thu Dec 08 04:24:27 CST 2016

Total time taken to generate the page: 0.11872 seconds