Solved

updating data to SQL 2012

Posted on 2014-03-31
5
415 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: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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

828 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