Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Migration 2008 to 2012

Author  Topic 

tooba
Posting Yak Master

224 Posts

Posted - 2012-07-19 : 21:13:50
Quick question

I am migrating 2008 to 2012 some of SP and UDF giving me error. One Error couldn't understand or let put this way i forget how to deal with,
Here is error when i trying to run SP on SQL 2012 (Incorrect syntax near '*='). I am not sure this sign show using Left join (Please correct me if i am wrong)
My question is if i remove from (*=) to (=) SP runs fine and getting same result. My question is just a simple change or i have to use Left/right Join? and Second error i m getting, Order By Items must appear in the select list if select DISTINCT is specified...

Help me out,

Thank You.

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-07-19 : 22:50:08
you need to replace old join syntaxes (*=,=* etc) to LEFT,RIGHT JOIN for it to work in SQL 2012

Also if SELECT DISTINCT is used as error says you need to have all fields you put in ORDER BY in select list

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

tooba
Posting Yak Master

224 Posts

Posted - 2012-07-20 : 02:20:02
Thanks for reply, Just want to make sure i understand right. *= = Left Join and =* = Right Join. Am i right?
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-07-20 : 10:34:08
yep.

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -