home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.databases.ms-sqlserver      Notorious Rube Goldberg contraption      19,505 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 17,506 of 19,505   
   Sylvain Lafontaine to All   
   Re: Code for converting tsql joins to an   
   27 May 09 11:01:15   
   
   XPost: microsoft.public.sqlserver.server, microsoft.public.sqlse   
   ver.programming   
   From: sylvainlafontaine2009@yahoo.ca   
      
   The problem here is that the old style for the outer joins (*=, =*) are not   
   really the same thing as the ANSI Left and Right Outer Join.  (It's a myth   
   to say that they are the same thing.).  Sure, when you have a single join in   
   your query, they give you the same result but when you have more than one   
   join, it's pretty easy to build a build a query that will return different   
   results for the old style and the ANSI style.  This point has been discussed   
   many times in the past from people asking why they didn't get the same   
   result anymore for some of their queries after they have been "translated"   
   to the ANSI style.   
      
   Not only such a tool doesn't exist but I would suggest that for those   
   queries with more than a single left or right outer join, you really double   
   check the result of your translation to see if they are really OK.   
      
   --   
   Sylvain Lafontaine, ing.   
   MVP - Windows Live Platform   
   Email: sylvain2009 sylvainlafontaine com (fill the blanks, no spam please)   
   Independent consultant and remote programming for Access and SQL-Server   
   (French)   
      
      
   "my name"  wrote in message   
   news:Xns9C15ADAEFD6D1testanoncom23232323@216.151.153.46...   
   > Hey all -   
   >   
   > I've been googling around trying to find some code that will process a   
   > tsql   
   > query string (with *=, =*, = joins) into ansi sql using the   
   > [left/inner/etc] JOIN y ON () format.   
   >   
   > Since so many people are having to make this change I expected to find a   
   > couple of algorithms and/or pseudo code that would handle this   
   > conversion... it seems like there would be a little bit of logic needed to   
   > decide on whether to place a condition in the ON or in the WHERE or in a   
   > virtual table depending upon the combination of old joins that are being   
   > used in a given query...   
   >   
   > Anyone know if someone invented that wheel already?   
   >   
   > Thanks!   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca