MySQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMySQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old November 11th, 2004, 01:59 PM
spangieUK spangieUK is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Posts: 2 spangieUK User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Copy data from one field to another???

Hi

I have two databases of which I need to copy data from one to another.

I have copied the complete table over named it product 1, the other table being product. What I now need to do is copy the data from the 15th field of product 1 into the 4th field of products. I am stumped! I did think (not for long!!) that I would just do it by hand - but nearly 1250 lines of data would take a month of sundays!! Can anyone help me at all?? I would be extremely grateful for any pointers as my SQL coding has already been maxed out!! Thanks in advance (I hope!)

Reply With Quote
  #2  
Old November 11th, 2004, 02:33 PM
spangieUK spangieUK is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Posts: 2 spangieUK User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question Syntax error?

Can anyone tell me what is wrong with the following? Should it just be update and set?

ALTER TABLE 'products1' ADD 'tempcol' decimal AFTER `products_small_description;
UPDATE 'products1' SET tempcol =`products_rrp`;
ALTER TABLE 'products1' DROP 'products_rrp1';
ALTER TABLE 'products1' CHANGE tempcol `products_rrp1` decimal;

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMySQL Development > Copy data from one field to another???


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT