distal-attribute
distal-attribute
distal-attribute
distal-attribute

Existing table. Insert new Column with Data

User, date Message
Written by Kembreg
2 years ago
Category: General
19 posts since Tue, 22 Jun 10
Hi.
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.

Regards,

David
Written by ansgar
2 years ago
4940 posts since Fri, 07 Apr 06
Try out the data tab on that table?
Written by Kembreg
2 years ago
19 posts since Tue, 22 Jun 10
Anse,

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?

David
Written by jfalchMoney, Euro
2 years ago
380 posts since Sat, 17 Oct 09
if you have text lines of the format

key,data

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.
Written by upl8t
2 years ago
4 posts since Tue, 28 Aug 12
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.