Home » RDBMS Server » Server Administration » Can someone tell me why this update statement is not working....Help
Can someone tell me why this update statement is not working....Help [message #371584] Thu, 09 November 2000 14:51 Go to next message
Eric
Messages: 78
Registered: April 1999
Member
update REGISTRATION_HIST A
set A.DATA_FROM_TBLE ='Meeting Registration'
from MEETING_REGISTRANT B, MEETING C
WHERE A.CUSTOMER = B.SHIP_CUSTOMER
AND A.MTG_CODE = B.MEETING
AND B.MEETING = C.MEETING
AND A.BEGIN_DATE = C.BEGIN_DATE
AND A.END_DATE = C.END_DATE
Re: Can someone tell me why this update statement is not working....Help [message #371591 is a reply to message #371584] Fri, 10 November 2000 03:16 Go to previous messageGo to next message
John R
Messages: 156
Registered: March 2000
Senior Member
How is it failing?

Is it updating the wrong row set?
Is it seting the values incorrectly?
Is it producing an error?

More information please....
Re: Can someone tell me why this update statement is not working....Help [message #371592 is a reply to message #371584] Fri, 10 November 2000 03:21 Go to previous message
John R
Messages: 156
Registered: March 2000
Senior Member
What it might be is this:

You seem to be setting the value of A.Data_From_Tble to a value held in another table.
If this is the case, yo are missing a SELECT statement.
Try this:

update REGISTRATION_HIST A
set A.DATA_FROM_TBLE = (SELECT required_value
from MEETING_REGISTRANT B, MEETING C
WHERE A.CUSTOMER = B.SHIP_CUSTOMER
AND A.MTG_CODE = B.MEETING
AND B.MEETING = C.MEETING
AND A.BEGIN_DATE = C.BEGIN_DATE
AND A.END_DATE = C.END_DATE)
Previous Topic: Re: how to update a table automatically
Next Topic: How do you use a bind variable in Oracle SQL
Goto Forum:
  


Current Time: Thu May 02 19:49:23 CDT 2024