Existing table. Insert new Column with Data

Kembreg posted 5 years ago in General
I have an existing table with 70 columns.
(Phrases in 70 different languages).

I would like to add a new column with data.
(Phrases in Punjabi).

The phrases must of course load in the proper place based on an index.

I am at a loss how to do this in Heid SQL.

As a side note: My server will not allow me to use the "Load Data File" function.

Any help would be greatly appreciated.


ansgar posted 5 years ago
Try out the data tab on that table?
Kembreg posted 5 years ago

I probably did not explain myself properly.

I have about 700 phrases to add to the new column.
Cannot do it by manual entry.
Looking for a way to import a text file.

My suggestion:

The text could have 2 fields.
The first field would be the key and the second, the data.
That way, a new column can be uplodaded into a table.

Is there a better way?

jfalch posted 5 years ago
if you have text lines of the format


you can transform these by simple text editor search-and-replace (or a very simple program) to

UPDATE tablename SET new_column="data" WHERE keyfield=key;

then store the result as an .sql file and execute it against your database.
upl8t posted 5 years ago
excel works great for doing these kinds of updates. Use the concatenate function to create the sql query. Don't forget to add a ; at the end of each line. copy the rows of sql you create in excel and paste into a query and run

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