Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Bad SQL.....
Dave,
You need to use a subquery in your Where clause:
..
WHERE available_power.driver_id =
(Select manpowerprofile.mpp_id
From manpowerprofile
Where manpowerprofile.mpp_terminationdt <>
TO_DATE('31-DEC-2049','DD-MON-YYYY') )
Jack
-----Original Message-----
Dave
Sent: Friday, May 25, 2001 12:01 PM
To: Multiple recipients of list ORACLE-L
I am trying to write an update statement but seem to be having problems. Below is my statement and the error in SQL*Plus.
1 UPDATE AVAILABLE_POWER SET available_power.driver_terminated = 'Y'
2 WHERE available_power.driver_id = manpowerprofile.mpp_id
3* and manpowerprofile.mpp_terminationdt <>
TO_DATE('31-DEC-2049','DD-MON-YYYY')
SQL> /
and manpowerprofile.mpp_terminationdt <>
TO_DATE('31-DEC-2049','DD-MON-YYYY')
*
I know that manpowerprofile.mpp_terminationdt is a valid table column. Do I need to do some type of join on these two tables? Or is it just Friday and I should give up and go have a cold beer!!:o) Any advice would be appreciated.
Thanks,
Dave
-- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Jack C. Applewhite INET: japplewhite_at_inetprofit.com Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-LReceived on Fri May 25 2001 - 13:20:04 CDT
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).
![]() |
![]() |