Solved

Importing .sql file into Server 2005...

Posted on 2008-06-25
7
257 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
Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

 

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

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

This article will describe one method to parse a delimited string into a table of data.   Why would I do that you ask?  Let's say that you need to pass multiple parameters into a stored procedure to search for.  For our sake, we'll say that we wa…
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…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

752 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