If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Inner Query Problem

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-07-06, 03:58
suneshkumar suneshkumar is offline
Registered User
 
Join Date: Jan 2006
Posts: 3
Inner Query Problem

hi friends,

I want to write a query like this

update organisation
set tandctext = (Select tandctext from organisation where nodeid=144)
where nodeid=5555;

but i am getting an error..please friends can u help regarding this issue in
Mysql4.0.26 and MySql5.0 versions please.


waiting for ur replies

Bye...
Reply With Quote
  #2 (permalink)  
Old 06-08-06, 10:03
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,534
either do it in two steps, or use a multi-table update query with a join (examples on the mysql.com site under the UPDATE syntax)
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On