The Logic Group Programming Test
The Logic Group Programming Test
Use PL-SQL, SQL or pseudo-code to fill the following table with one row for each minute of a day, there should be 1440 (i.e. 24*60) rows in total. CREATE TABLE CDW_MINUTES ( MINUTE_KEY NUMBER(38) NOT NULL, MINUTE_IN_DAY CHAR(4) NOT NULL, MINUTE_IN_HOUR CHAR(2) NOT NULL, HOUR_IN_DAY24 CHAR(2) NOT NULL, HOUR_IN_DAY12 CHAR(2) NOT NULL, AM_PM CHAR(2) NOT NULL );
o The column MINUTE_KEY should be populated from the sequence GENERAL_SEQ. o The column MINUTE_IN_DAY is the absolute minute in the day in fixed length format. The
first 3 rows should contain: 0000, 0001, 0002 etc.
o The column MINUTE_IN_HOUR is the minute in the hour in fixed length format. For
example if MINUTE_IN_DAY is 0063 then MINUTE_IN_HOUR is 03.
o The column HOUR_IN_DAY24 is the hour number in the day in 24 hour format. For
o example 00, 01, , 23. The column HOUR_IN_DAY12 is the hour number in the day in 12 hour format. For example 12, 01, The column AM_PM should contain either AM or PM.
Please provide your code (or pseudo code) and any notes or comments about how you would undertake the task.