deSilentio
IS-IT--Management
I am in need of some help. We have a database that has two tables, one that holds a computers information and the other that holds model numbers that computers have.
The tables are set up like this:
tbl_comp: comp_ID (auto), comp_mod_ID (num), comp_desc (Char)
tbl_model: mod_ID (auto), mod_modelName (Char)
I can perform an INSERT command to enter a computer, but in order for it to reference the Model Number table, I have to use the mod_ID field. (which I think is best practice)
I want to be able to do the INSERT command, but use the modelName instead. So I think I need to do some kind of lookup, where I pass in the modelName, but it inserts in the modelID.
However, I do not know what to call this procedure, and therefore I cannot search for help on google.
Any help is appreciated. If I am unclear on my question, please let me know.
Thanks,
John Dombrowski
The tables are set up like this:
tbl_comp: comp_ID (auto), comp_mod_ID (num), comp_desc (Char)
tbl_model: mod_ID (auto), mod_modelName (Char)
I can perform an INSERT command to enter a computer, but in order for it to reference the Model Number table, I have to use the mod_ID field. (which I think is best practice)
I want to be able to do the INSERT command, but use the modelName instead. So I think I need to do some kind of lookup, where I pass in the modelName, but it inserts in the modelID.
However, I do not know what to call this procedure, and therefore I cannot search for help on google.
Any help is appreciated. If I am unclear on my question, please let me know.
Thanks,
John Dombrowski