{"id":1486,"date":"2012-07-09T21:58:36","date_gmt":"2012-07-10T02:58:36","guid":{"rendered":"http:\/\/www.dpriver.com\/blog\/?page_id=1486"},"modified":"2012-07-10T02:17:41","modified_gmt":"2012-07-10T07:17:41","slug":"oracle-sql-query-rewrite-make-columns-suppressed-using-rtrim-function-or-%e2%80%980%e2%80%99","status":"publish","type":"page","link":"https:\/\/www.dpriver.com\/blog\/list-of-demos-illustrate-how-to-use-general-sql-parser\/oracle-sql-query-rewrite\/oracle-sql-query-rewrite-make-columns-suppressed-using-rtrim-function-or-%e2%80%980%e2%80%99\/","title":{"rendered":"Oracle SQL Query rewrite: Make columns suppressed using RTRIM function or \u2018+0\u2019"},"content":{"rendered":"

Make columns suppressed using RTRIM function or \u2018+0\u2019<\/p>\n

If we want to make specific table as leading table, then we can use suppressing on the join columns of the table.<\/p>\n

This is an article of Oracle SQL Query rewrite serials<\/a>.<\/p>\n

Take this sql for example:<\/p>\n

    \r\nSELECT sum(salary)\r\nFROM   emp, salary, dept\r\nWHERE  emp.emp_id  = salary.emp_id \r\nAND    emp.dept_no = dept.dept_no\r\nAND    dept.location = 'SEOUL' ;\r\n<\/pre>\nSQL will be translated into:(salary table is leading table)<\/p>\n\r\nSELECT SUM(salary)\r\nFROM   emp,\r\n       salary<\/strong>,\r\n       dept\r\nWHERE  emp.emp_id = salary.emp_id + 0<\/strong>\r\n       AND emp.dept_no = dept.dept_no\r\n       AND dept.location = 'SEOUL' \r\n<\/pre>\nDownload this demo: C# version<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"Make columns suppressed using RTRIM function or \u2018+0\u2019 If we want to make specific table as leading table, then we can use suppressing on the join columns of the table. This is an article of Oracle SQL Query rewrite serials. Take this sql for example: SELECT sum(salary) FROM emp, salary, dept WHERE emp.emp_id = salary.emp_id AND emp.dept_no = dept.dept_no AND dept.location = ‘SEOUL’ ; SQL will be translated into:(salary table is leading table) SELECT SUM(salary) FROM emp, salary, dept WHERE emp.emp_id = salary.emp_id + 0 AND emp.dept_no = dept.dept_no AND dept.location = ‘SEOUL’ Download this demo: C# version<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":1445,"menu_order":0,"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