|
-
Jun 26th, 2003, 07:06 AM
#1
Thread Starter
Frenzied Member
*RESOLVED* Copying data from database and assign new unique number
I have a table that holds 5 fields, field1 is the unique number and field2-5 are the details.
i.e. If I have a number cars, the same make and model, all details are the same except for the unique car number. So how can I copy the details from CAR001 to CAR002?
Last edited by mel_flynn; Jun 26th, 2003 at 10:05 AM.
Mel
-
Jun 26th, 2003, 08:22 AM
#2
Hyperactive Member
Well, you could create the new car information...just inputting the new unique number...so fields 2 - 5 will be generic or null.
Then go back and run an Update on this new unique number using the details that came from car1.
UPDATE table1
SET field2 = car1field2, field3 = carfield3, field4=car1field4, field5 = car1field5
WHERE field1 = car2field2.
I'm not sure how you create the unique number, but it seems that you would know this information already.
-
Jun 26th, 2003, 09:29 AM
#3
Thread Starter
Frenzied Member
Thanx rplcmint, will give it a go.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|