Using DECODE, write a query that checks the phone number of students. If the area code is 212, remove it. If it is anything else., put a 1- in front of the phone number. Display the student name and the phone number. If they have no phone number, display “No Phone”.
What will be an ideal response?
```
SELECT first_name||' '||last_name Student,
DECODE(SUBSTR(phone,1,3),'212',
SUBSTR(phone,5),
null, 'No phone',
'1-'||phone) Phone
FROM student
```
You might also like to view...
The _________ properties are defined in the javafx.scene.shape.Shape class.
a. stroke b. strokeWidth c. fill d. centerX
You would use a ________ to temporarily display records of residents of the city of Boston
A) sieve B) validation rule C) filter D) field constraint
For best results in sharing an exported query, select:
A) Microsoft Office 2003 Workbook. B) General Workbook. C) Excel 3.1 Workbook. D) Excel 97 — Excel 2003 Workbook.
Which of the following is not a good reason for adding your name to the User name and Initials area in PowerPoint Options?
A) It is used to indicate if you were the author of the presentation. B) It is used to identify comments that you make. C) It is used to indicate if you were the last person to modify the presentation. D) It is used to guarantee ownership of the presentation.