Solved

updating data to SQL 2012

Posted on 2014-03-31
5
410 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
  • 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:ScottPletcher
ID: 39967983
LEFT OUTER JOIN.
0
 
LVL 69

Expert Comment

by:ScottPletcher
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:
ScottPletcher 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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Test a query 23 19
Stored procedure 23 24
Service Statictic 11 14
Search and display values in the textbox using VB.net and SQL 19 10
In this article I will describe the Detach & Attach method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Viewers will learn how the fundamental information of how to create a table.

746 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

10 Experts available now in Live!

Get 1:1 Help Now