I am having trouble getting started on the developing an insert statement.
I have two tables, equipment and service.
This what I have now.
"INSERT INTO Service(Equipment_ID)
SELECT Equipment_ID FROM Equipment where department_id = 3;"
This works ok, but I need to go further.
The equipment table is an inventory of medical equipment.
all I need is the equipment id based on the department ID. Which works ok.
But I need to add additional data to the service table. I need to add a service code( field name "code") , todays date (field name "problem_date", Text " safety inspection required" in field "problem" this will be the same for records in the statement. All I get now is the equipment ID.
The purpose is to run this statement and it will generate PM workorders in the service table based on the department ID.
trying to learn sql but the requirement is needed quickly. I am a one man show and resources are limited.