Re: update SQL
"Nagy, Len" <[email protected]> Thu, 13 Feb 2003 17:20:01 -0500
| Newsgroups | gmane.comp.db.oracle.devel |
|---|---|
| Message-ID | <LYRIS-1796914-873273-2003.02.13-22.22.03--gcdod-oracle#[email protected]> |
Something like this? UPDATE ps_payment SET adjust = 'N' , user_login_track_id = 1 , payment_status_id = 1 WHERE payment_id IN ( SELECT payment_id FROM PS_PAYMENT_NETTED NET WHERE NET.PAYMENT_NETTED_ID = 4 ) Best Regards Len Nagy Lead systems architect "They that give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -- Benjamin Franklin, Historical Review of Pennsylvania, 1759 -----Original Message----- From: Greg Griffiths [mailto:[email protected]] Sent: Thursday, February 13, 2003 4:51 PM To: Oracle Subject: [oracle] Re: update SQL This looks more like a SELECT statement starting with the word UPDATE than an Oracle update statement, check the syntx, I think that you can only do a single table per query : UPDATE <table name> SET <fieldname1> = <fieldvalue1> , <fieldname n> = <fieldvalue n> WHERE <fieldname1> = <fieldvalue1> , <fieldname n> = <fieldvalue n> At 19:03 13/02/03 +0000, you wrote: >Hi, >I have one problem while executing the update statement as per my >knowledge it should in the SQL server/ sybase but not sure about Oracle >and its not working Can anybody can help me : >Here is my update statement > > >UPDATE PS_PAYMENT SET ADJUST = 'N', user_login_track_id = 1, >payment_status_id = 1 FROM PS_PAYMENT PS,PS_PAYMENT_NETTED NET WHERE >NET.PAYMENT_ID = PS.PAYMENT_ID AND NET.PAYMENT_NETTED_ID = 4 > > >error is : >ERROR at line 1: >ORA-00933: SQL command not properly ended > >I will appreciate for quick reply. > >Thanks >Manish >--- >Change your mail options at http://p2p.wrox.com/manager.asp or >to unsubscribe send a blank email to %%email.unsub%%. --- Change your mail options at http://p2p.wrox.com/manager.asp or to unsubscribe send a blank email to %%email.unsub%%. --- Change your mail options at http://p2p.wrox.com/manager.asp or to unsubscribe send a blank email to [email protected].