for example it may be desired to include any sales of product number 9 which occurred in the first fiscal quarter into the results for the second fiscal quarter instead of in the first fiscal quarter thus in this example it is possible to define a constraint for table y00q1 to prevent entry of data for product u201c 9 u201d as follows alter table y00q1 add constraint y00q1_chk_product check product_no lt gt 9 and to define a before trigger for table y00q2 which for product u201c 9 u201d changes the date to the first day of the second fiscal quarter as follows case when n product_no 9 and month n date in 1 2 3 similarly it may be desired to include any sales of product number 7 which occurred in the second fiscal quarter into the results for the first fiscal quarter thus in this example it is possible to define a constraint for table y00q2 to prevent entry of data for product u201c 7 u201d as follows alter table y00q2 add constraint y00q2_chk_product check product_no lt gt 7 and to define a before trigger for table y00q1 which for product u201c 7 u201d changes the date to the first day of the first fiscal quarter as follows case when n product_no 7 and month n date in 4 5 6 when an insert is performed against a union all view there are three possible outcomes namely the insert can fail against all of the base tables as a.