How do I setup outer join reports, such as a report that will display work orders with no reason code? |
Not all work orders have the repair reason code. If work order is PM, then there is a possibility that the repair reason is left blank. No data in the reason code table is blank. So if you do a regular join with that table, the report will only show records that have an equal match in the reason table. If it does not, such as the case with PM work orders that do not have a reason code, it would skip that work order. In order to display ALL work orders even if the reason code is blank, an outer join is required.
Oracle – The symbol is (+) and should be placed on the left side of the argument. The table_name.column_name that is deficient of data must be on the left side of the argument. Example:
RSN_MAIN.REAS_REAS_FOR_REPAIR(+)=JOB_MAIN.REAS_REAS_FOR_REPAIR
SQL Server – The symbol is * and should be placed on the left side of the argument. The table_name.column_name that has the data must be on the left side of the argument. Example:
JOB_MAIN.REAS_REAS_FOR_REPAIR*=RSN_MAIN.REAS_REAS_FOR_REPAIR