Solved

Importing .sql file into Server 2005...

Posted on 2008-06-25
7
260 Views
Last Modified: 2013-11-05
I have a .sql file that will create a new database.  It was made for SQL 2000, but we are running SQL 2005.  When I run the .sql file it completes, but gives some errors about join operators that do not work in 2005.  I know that you can make a database's compatibility level SQL 2000 after it is created, but I need to set the compatibility level before I execute the script so that it finishes without errors.  Can this be done?
0
Comment
Question by:yoi55
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
7 Comments
 
LVL 75

Assisted Solution

by:Aneesh Retnakaran
Aneesh Retnakaran earned 20 total points
ID: 21866668
the *= , =* wont work in sql 2005 , you need to change those first
0
 

Author Comment

by:yoi55
ID: 21866791
I did not create the .sql file.  I am also not an SQL wiz by any means (took one class in college about 5 years ago and haven't used it since).  Do I have to go through and manually change the join operators?  If so, what do I change them to?
0
 
LVL 60

Assisted Solution

by:chapmandew
chapmandew earned 40 total points
ID: 21867159
post the .sql file...we'll change them for you.
0
SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

 

Author Comment

by:yoi55
ID: 21867546
The uncompressed file is over 7MB in size.  It is attached.
SQL-File.zip
0
 

Author Comment

by:yoi55
ID: 21877972
I need to get this resolved pretty quick.  I can edit the file myself, but I cannot figure out exactly what needs to be changed.  I have attached a code snippet...what do I change it make it compatible with SQL Server 2005 (ANSI)?
SELECT i.FLDREC_NUM,
          i.FLDEMPLOYEE,
          i.FLDNORMAL,
          i.FLDRESULT,
          i.FLDDATE,
          E.FLDBDATE,
          E.FLDSEX,
          G.FLDM_OR_F
   FROM   inserted        i,
          EMPLOYEE E,
          GENDER   G
   WHERE  E.FLDREC_NUM  = i.FLDEMPLOYEE AND
          E.FLDSEX     *= G.FLDCODE     AND
          i.FLDNORMAL   > ' '

Open in new window

0
 
LVL 60

Assisted Solution

by:chapmandew
chapmandew earned 40 total points
ID: 21877997
SELECT i.FLDREC_NUM,
          i.FLDEMPLOYEE,
          i.FLDNORMAL,
          i.FLDRESULT,
          i.FLDDATE,
          E.FLDBDATE,
          E.FLDSEX,
          G.FLDM_OR_F
   FROM   inserted        i
          JOIN EMPLOYEE E ON E.FLDREC_NUM  = i.FLDEMPLOYEE
          LEFT JOIN GENDER   G ON E.FLDSEX    = G.FLDCODE
   WHERE  
          i.FLDNORMAL   > ' '
0
 

Accepted Solution

by:
yoi55 earned 0 total points
ID: 21927558
Well, it turns out that I was going about this the wrong way.  I had to create a blank database in SQL 2005 (90) and then set its compatibility to SQL 2000 (80).  I didn't have to change any of the code at all.
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article will provide a solution for an error that might occur installing a new SQL 2005 64-bit cluster. This article will assume that you are fully prepared to complete the installation and describes the error as it occurred durin…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

631 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question