Solved

Importing .sql file into Server 2005...

Posted on 2008-06-25
7
220 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
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 

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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

by Mark Wills PIVOT is a great facility and solves many an EAV (Entity - Attribute - Value) type transformation where we need the information held as data within a column to become columns in their own right. Now, in some cases that is relatively…
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

743 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now