Ads were blocked by your webbrowser.

This is not a problem, but keep in mind that developing HeidiSQL, user support and hosting takes time and money.

You may want to send a donation instead.

Insert Files Into Fields Question

jamsession's profile image jamsession posted 9 years ago in General
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

ansgar's profile image ansgar posted 9 years ago
I have a gutt feeling you need UPDATE, not INSERT for whatever you're trying to achieve.

However, the "Insert files" dialog creates new rows, and does not update anything.
jamsession's profile image jamsession posted 9 years ago
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
ansgar's profile image ansgar posted 9 years ago
Errorcode 13 is "Permission denied" (see "perror.exe 13")

You're right - this is not code related. It's the MySQL server being unable to write to /tmp . I guess the system user which MySQL uses to run needs some more privileges.

Please login to leave a reply, or register at first.