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
Solved

Importing .sql file into Server 2005...

Posted on 2008-06-25
7
246 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
  • 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
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 

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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
sql Audit table 3 74
Updating statistics with error notification email in SQL server 4 109
kill process lock Sql server 9 63
Help  needed 3 35
by Mark Wills Attending one of Rob Farley's seminars the other day, I heard the phrase "The Accidental DBA" and fell in love with it. It got me thinking about the plight of the newcomer to SQL Server...  So if you are the accidental DBA, or, simp…
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…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

839 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