{"id":361,"date":"2010-07-21T22:17:24","date_gmt":"2010-07-22T03:17:24","guid":{"rendered":"http:\/\/www.dpriver.com\/blog\/?page_id=361"},"modified":"2013-06-26T04:23:33","modified_gmt":"2013-06-26T09:23:33","slug":"rewrite-sql-server-propriety-joins-to-ansi-sql-compliant-joins","status":"publish","type":"page","link":"https:\/\/www.dpriver.com\/blog\/list-of-demos-illustrate-how-to-use-general-sql-parser\/rewrite-sql-server-propriety-joins-to-ansi-sql-compliant-joins\/","title":{"rendered":"Rewrite SQL Server proprietary joins to ANSI SQL compliant joins"},"content":{"rendered":"

This demo illustrates how to rewrite SQL Server proprietary joins to ANSI SQL compliant joins, it\u2019s a very useful tool if you have lots of old SQL Server propriety joins that need to be converted to ANSI SQL compliant joins. You can also learn how to rewrite SQL to meet your own requirement from this demo.<\/p>\n

\nSQL Server propriety joins\n<\/p>\n

    \r\nSELECT t1.*\r\nFROM   table1 t1,\r\n       table2 t2\r\nWHERE  t1.f1 *= t2.f1\r\n       AND t1.f2 > 10 \r\n<\/pre>\n\nConvert to ANSI SQL compliant joins\n<\/p>\n\r\nSELECT t1.*\r\nFROM   table1 t1\r\n       LEFT JOIN table2 t2\r\n         ON t1.f1 = t2.f1\r\nWHERE  t1.f2 > 10 \r\n<\/pre>\nDownload this demo: C# version<\/a><\/p>\nReference:<\/p>\n1. sybase: Converting outer joins with join-order dependency<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"This demo illustrates how to rewrite SQL Server proprietary joins to ANSI SQL compliant joins, it\u2019s a very useful tool if you have lots of old SQL Server propriety joins that need to be converted to ANSI SQL compliant joins. You can also learn how to rewrite SQL to meet your own requirement from this demo. SQL Server propriety joins SELECT t1.* FROM table1 t1, table2 t2 WHERE t1.f1 *= t2.f1 AND t1.f2 > 10 Convert to ANSI SQL compliant joins SELECT t1.* FROM table1 t1 LEFT JOIN table2 t2 ON t1.f1 = t2.f1 WHERE t1.f2 > 10 Download this\u2026<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":235,"menu_order":210,"comment_status":"closed","ping_status":"open","template":"gsp_feature_page_tt.php","meta":[],"blocksy_meta":{"styles_descriptor":{"styles":{"desktop":"","tablet":"","mobile":""},"google_fonts":[],"version":5}},"yoast_head":"\nHelp you to make better use of General SQL Parser<\/title>\n\n\n\n\n\n\n\n\n\n\n\n\n\t\n