0% found this document useful (0 votes)
53 views

The Logic Group Programming Test

The document provides instructions to populate a table with minute-level data for a full day (1440 rows total) by deriving various time fields from the minute number within the day. Fields include the minute number in the day, the minute within the hour, the hour in 24-hour and 12-hour format, and the AM/PM designation. The task is to write PL/SQL, SQL, or pseudocode to perform this population.

Uploaded by

Chuka Osemeka
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
53 views

The Logic Group Programming Test

The document provides instructions to populate a table with minute-level data for a full day (1440 rows total) by deriving various time fields from the minute number within the day. Fields include the minute number in the day, the minute within the hour, the hour in 24-hour and 12-hour format, and the AM/PM designation. The task is to write PL/SQL, SQL, or pseudocode to perform this population.

Uploaded by

Chuka Osemeka
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 1

PL/SQL 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.

You might also like