views:

27

answers:

0

Hello everyone,

First up, this might be the wrong place to ask this question.. So, sincere apologies for that!

I have two MySQL Tables as follows:

First Table: employee_data

id   name         address        phone_no

1    Mark         Some Street    647-981-1512

2    Adam         Some Street    647-981-1214

3    John         Some Street    647-981-1452

Second Table: employee_wages

id   employee_id         wages        start_date

1       3                $15          12 March 2007

2       1                $20          10 Oct 2008

3       2                $18          2 June 2006

I know, both these tables can be combined into one and there is no need to split this data into two tables. But, what i'm working on requires this data to be separate and in two different tables.

Now, previously my company used to handle all this data in Excel sheets and they followed the conventional method of having these two tables combined into one sheet as follows:

Excel Sheets

id   name           wages         start_date

1    Mark           $20           10 Oct 2008

2    Adam           $18           2 June 2006

3    John           $15           12 March 2007

Now, the objective is to Export the data from Excel sheets into MySQL Tables.

As you can notice employee_data.id is linked to employee_wages.employee_id

How can i replace the values in the Excel Sheet 'name' column so that they represent the actual unique ID they're given in the employee_data.id column..

May be i can do it with PHP/MySQL or i can get this done in VB Script.. BUt, I'm not an expert in VB Script..

Any help will be much appreciated..

Thanks!