Solved

Importing .sql file into Server 2005...

Posted on 2008-06-25
7
253 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

So every once in a while at work I am asked to export data from one table and insert it into another on a different server.  I hate doing this.  There's so many different tables and data types.  Some column data needs quoted and some doesn't.  What …
Data architecture is an important aspect in Software as a Service (SaaS) delivery model. This article is a study on the database of a single-tenant application that could be extended to support multiple tenants. The application is web-based develope…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

756 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