0% found this document useful (0 votes)
110 views3 pages

ICT501 Exercise 4 More Functions

The document contains instructions and examples for exercises using functions in a database management system course. It provides SQL queries to display employee names, hire dates, and salary review dates from different departments and with formatted output. The final example shows a query that returns the day of the week for any date entered in a specific format.

Uploaded by

Aida Borhan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
110 views3 pages

ICT501 Exercise 4 More Functions

The document contains instructions and examples for exercises using functions in a database management system course. It provides SQL queries to display employee names, hire dates, and salary review dates from different departments and with formatted output. The final example shows a query that returns the day of the week for any date entered in a specific format.

Uploaded by

Aida Borhan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

UNIVERSITI TEKNOLOGI MARA

KAMPUS SEREMBAN

CAWANGAN NEGERI SEMBILAN

FACULTY OF COMPUTER AND MATHEMATICAL SCIENCES (FSKM)

ICT501

DATABASE MANAGEMENT SYSTEM

TITLE:

Exercise 4 (More functions)

NAME STUDENT ID
NUR HAZIERA BINTI BAHAR 2019608162

PROGRAMME: CS241 – BACHELOR OF SCIENCE (HONS) STATISTICS

CLASS: N4CS2413T2

PREPARED FOR: SIR SHAMSUDIN MD SARIF

SUBMISSION DATE: 17th OCTOBER 2019


Exercise 4: More Functions

1. Display each employee's name and hiredate from deptno 20. Make sure that you specify the
alias 'DATE_HIRED' after your expression otherwise the formatted column will wrap; it uses a
width of 80 characters which is the default for character columns.

ENAME DATE_HIRED
---------- --------------------------------
SMITH June, Thirteenth 1983
JONES October, Thirty-First 1983
SCOTT March, Fifth 1984
ADAMS June, Fourth 1984
FORD December, Fifth 1983

2. Display each employee name with hiredate, and salary review date. Assume review date is one
year after hiredate. Order the output in ascending review date order.
3. Print a list of employees displaying just salary if more than 1500. If exactly 1500 display 'On
Target', if less than 1500 display 'Below 1500'.

4. Write a query which will return the DAY of the week (ie. MONDAY), for any date entered in the
format: DD.MM.YY.

Enter value for any date: 12.11.88

DAY
------------------------------------------------------
SATURDAY

You might also like