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 > Update Problem

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-22-07, 17:47
ortho ortho is offline
Registered User
 
Join Date: Nov 2006
Location: Quebec
Posts: 172
Update Problem

Hi all!

I have a problem with an update statement wich I dont unsderstand why it fails.

here my query:
Code:
 UPDATE m SET m.med_type_id = mt.med_type_id FROM site_medias m INNER JOIN site_medias_types mt ON m.med_type = mt.med_type
Help please
__________________
Less is more.
How long is now?
http://www.lesouterrain.com
Reply With Quote
  #2 (permalink)  
Old 12-22-07, 17:48
ortho ortho is offline
Registered User
 
Join Date: Nov 2006
Location: Quebec
Posts: 172
#1064 - Erreur de syntaxe pr�s de 'FROM site_medias m
INNER JOIN site_medias_types mt ON m.med_typ' � la ligne 3
__________________
Less is more.
How long is now?
http://www.lesouterrain.com
Reply With Quote
  #3 (permalink)  
Old 12-22-07, 18:04
ortho ortho is offline
Registered User
 
Join Date: Nov 2006
Location: Quebec
Posts: 172
It's ok I finnaly figured it out.

Code:
UPDATE site_medias m
LEFT JOIN site_medias_types mt ON m.med_type=mt.med_type
SET m.med_type_id=mt.med_type_id
__________________
Less is more.
How long is now?
http://www.lesouterrain.com
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