I'm trying to insert columns, from one table, into another.
I already tried an INSERT command, but it did not work. Although my syntax was correct, there was a logical error; mysql would only start inserting new data on the line immediately following the bottom of the existing columns of data.
So, now, I am wondering if Import>Insert Files Into TEXT/BLOB Fields... will help.
Any thoughts?
- j
Insert Files Into Fields Question
Using Heidisql's query editor, I tried the following code to insert the contents of 3 columns, from phpbb2_posts_text, into 3 columns of phpbb3_posts3.
Both tables are located in the same database.
Further, phpbb3_posts3's post_id column already exists and sequentially increases, from 2 to 218727.
UPDATE phpbb2_posts_text A, phpbb3_posts3 B
SET B.bbcode_uid=A.bbcode_uid,B.post_subject=A.post_subject,B.post_text=A.post_text
WHERE B.post_id<=218727
Unfortunately, the above code resulted in the following error message:
SQL Error (1): Can't create/write to file '/tmp/#sql_4bd9_0.myi' (Errcode:13)
I have a feeling that the error is not code-related, but I would appreciate learning your opinion.
Please reply.
- j
Both tables are located in the same database.
Further, phpbb3_posts3's post_id column already exists and sequentially increases, from 2 to 218727.
UPDATE phpbb2_posts_text A, phpbb3_posts3 B
SET B.bbcode_uid=A.bbcode_uid,B.post_subject=A.post_subject,B.post_text=A.post_text
WHERE B.post_id<=218727
Unfortunately, the above code resulted in the following error message:
SQL Error (1): Can't create/write to file '/tmp/#sql_4bd9_0.myi' (Errcode:13)
I have a feeling that the error is not code-related, but I would appreciate learning your opinion.
Please reply.
- j
Please login to leave a reply, or register at first.