Solved

updating data to SQL 2012

Posted on 2014-03-31
5
419 Views
Last Modified: 2014-04-07
I backed up a SQL 2000 database and restored in SQL 2005, then restored the SQL 2005 backup to SQL 2012.

The Stored Procedures need some updating, one of the errors is regarding '*='

Does anyone know what this expression has been replaced with?

Thank you
0
Comment
Question by:urthrilled
[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
  • 3
  • 2
5 Comments
 
LVL 29

Expert Comment

by:QPR
ID: 39967882
Can you show some code where you are using "*=" please
0
 
LVL 69

Expert Comment

by:Scott Pletcher
ID: 39967983
LEFT OUTER JOIN.
0
 
LVL 69

Expert Comment

by:Scott Pletcher
ID: 39967987
For example, if you see something like:

SELECT t1.*, t2.name, ...
FROM dbo.table1 t1, dbo.table2 t2
WHERE
    t1.id *= t2.id

The modern equivalent is:

SELECT t1.*, t2.name, ...
FROM dbo.table1 t1
LEFT OUTER JOIN dbo.table2 t2 ON
    t1.id = t2.id
0
 
LVL 29

Expert Comment

by:QPR
ID: 39968035
Ahhh been a while!
No longer supported http://msdn.microsoft.com/en-us/library/ms144262.aspx

So as Scott posted above, you need to change them to the modern equivalent
0
 
LVL 69

Accepted Solution

by:
Scott Pletcher earned 500 total points
ID: 39968120
But you have to be extremely careful when testing the re-coded queries, because
LEFT OUTER JOIN can behave differently from *=, particularly relating to conditions in the WHERE clause on the right-hand table (table2 in my example above).

If you need further help with that, let us know.
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

632 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