Core component of SQL Server for storing, processing, and securing data
Hi devid brevis ,
Thanks for reaching out to the Microsoft Q & A Forum.
To fix your SQL script, you’ll need to correct both syntax and logical errors. Clean up the table creation syntax by removing extra words like stray backticks, ensuring the CREATE TABLE statement ends properly with a single closing parenthesis. Avoid inserting duplicate primary keys since each EmployeeID must be unique. Ensure that all column names are valid by changing Dept to Department in the INSERT statement and EmpDept to Department in the UPDATE statement. Respect NOT NULL constraints by providing a valid value for EmployeeID instead of NULL. If you are joining tables, make sure referenced objects like Departments exist; otherwise, create them or remove the join. Once these syntax and logic issues are corrected, your script should execute successfully without errors.
I hope this information helps. Please do let us know if you have any further queries.
Thank you