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 > MySQL question

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-09-04, 11:43
exdter exdter is offline
Registered User
 
Join Date: Aug 2003
Posts: 328
MySQL question

I have never used MySQL but am guessing it is not like SQL for Oracle. My query says this:
update work_order
set row_num=(select max(row_num)+1 from work_order)
where row_num=5
and I am getting an error. Anyone know why?
Or maybe someone has an idea of how I can make a rownum in my table?
Thanks

Last edited by exdter; 03-09-04 at 11:59.
Reply With Quote
  #2 (permalink)  
Old 03-09-04, 14:54
aus aus is offline
Registered User
 
Join Date: Oct 2003
Location: Denver, Colorado
Posts: 137
Re: MySQL question

Your MySQL version does not support subqueries. You should use the MySQL REPLACE if you have a unique index on your table.
http://www.mysql.com/doc/en/REPLACE.html
Reply With Quote
  #3 (permalink)  
Old 03-09-04, 15:48
exdter exdter is offline
Registered User
 
Join Date: Aug 2003
Posts: 328
Re: MySQL question

Got it working. Thanks.
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