Insert into Reference Table with Foreign Keys from 2 tables

I am trying to create an insert statement for inserting values into the table "ext_ln_element_map" table where the insert should NOT create duplicates based on the 2 foreign keys (ext_src_element_id and ln_std_element_id).

The data to be inserted is in excel where the columns in the excel sheet are as below:
ln_data_level_name, ln_element_name, ext_src_table_name, ext_src_element_name, ext_ln_element_map_rule, ext_ln_element_map_note.

The primary key in all tables are set to auto generate.

I am really struggling and would appreciate help.

Thanks so much in advance.

AKA

hi

are you trying in SQL Server T-SQL ???

how exactly are you struggling ..please let us know ..
once we understand then we can help for sure
:slight_smile:
:slight_smile:

I am using MySQL.

this is a t sql forum

Apologies.
Could you please suggest where can I post this for help.

http://forums.devshed.com/mysql-help-4/

Please try this

you can google search MySQL Forums

hope this helps
:slight_smile:
:slight_smile: