Sign in to follow this  

SQL Script Help

Recommended Posts

Circaflex    3,018

Hey guys so i have another assignment I am having trouble with. We just setup SQL Server and are creating a script, it asks to run parse first to ensure no errors, then execute. I have attached the pdf of the script i had to copy into sql along with my script in txt format.

i run parse and it opens a new window, but seems to just stop until i hit continue, it then says it completed successfully. when i try to execute the script it get this error, "Msg 2714, Level 16, State 6, Line 5
There is already an object named 'DEPARTMENT' in the database." I am hoping I am just over looking the error. Thanks

Share this post

Link to post
Share on other sites
Kami-    178

Well quite simply, you already have an object in your database named 'Department', if you're all sharing a database that'll be why.


Effectively if want to do a check to see i the database object already exists, if not then create it (or drop and recreate it if that's what you want).

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.