I have to create a very simple db2 table. It will hold only 2 columns called center and time. For now it will hold only 6 records like below.(it will grow soon):
I have an existing embedded SQL statement (below inside a cursor) looking for finished goods up to 8 hours after they were completed. The change I am trying to make is instead of using '+ 8 HOURS' I want to use a variable which looks at this table and determines the amount of hours based on the center.
I get the center I need to look up from another table called a.center in a cursor.Code:AND DATE(A.LOC_DT_TM) BETWEEN DATE(:exit_dt_tm) AND DATE(:exit_dt_tm) + '8 HOURS'
So I need to compare a.center to my table above and return the time in hours listed. Any help is greatly appreciated.