Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

updating data to SQL 2012

Posted on 2014-03-31
5
Medium Priority
?
422 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 70

Expert Comment

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

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 70

Accepted Solution

by:
Scott Pletcher earned 2000 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Microsoft Access has a limit of 255 columns in a single table; SQL Server allows tables with over 255 columns, but reading that data is not necessarily simple.  The final solution for this task involved creating a custom text parser and then reading…
This month, Experts Exchange sat down with resident SQL expert, Jim Horn, for an in-depth look into the makings of a successful career in SQL.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

877 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