exam questions

Exam 1z0-082 All Questions

View all questions & answers for the 1z0-082 exam

Exam 1z0-082 topic 1 question 53 discussion

Actual exam question from Oracle's 1z0-082
Question #: 53
Topic #: 1
[All 1z0-082 Questions]

st
You need to calculate the number of days from 1
January 2019 until today.
Dates are stored in the default format of DD-MON-RR.
Which two queries give the required output? (Choose two.)

  • A. SELECT TO_CHAR(SYSDATE, 'DD-MON-YYYY') ג€" '01-JAN-2019' FROM DUAL;
  • B. SELECT ROUND(SYSDATE ג€" '01-JAN-2019') FROM DUAL;
  • C. SELECT ROUND(SYSDATE ג€" TO_DATE('01/JANUARY/2019')) FROM DUAL;
  • D. SELECT TO_DATE(SYSDATE, 'DD/MONTH/YYYY') ג€" '01/JANUARY/2019' FROM DUAL;
  • E. SELECT SYSDATE ג€" TO_DATE('01-JANUARY-2019') FROM DUAL;
Show Suggested Answer Hide Answer
Suggested Answer: CE 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
nautil2
2 months, 2 weeks ago
Selected Answer: CE
A - false; query <SELECT TO_CHAR(sysdate,'DD-MON-YYYY') - '01-JAN-2019' FROM dual;> returns ORA-01722: invalid number B - false; query <SELECT ROUND(sysdate - '01-JAN-2019') FROM dual;> returns ORA-01722: invalid number C - true; query <SELECT ROUND(sysdate - TO_DATE('01/JANUARY/2019')) FROM dual;> returns number of days as natural number D - false; query <SELECT TO_DATE(sysdate,'DD/MONTN/YYYY') - '01/JANUARY/2019' FROM dual;> returns ORA-01821: date format not recognized E - true; query <SELECT sysdate - TO_DATE('01/JANUARY/2019') FROM dual;> returns number of days as floating number
upvoted 1 times
...
Oracle2020
4 months, 2 weeks ago
The Answer: C, E The dates in the select '01-jan-2019' have to be converted with To_Date
upvoted 1 times
...
musafir
5 months, 3 weeks ago
The Options should be: A. SELECT TO_CHAR (SYSDATE, ‘DD-MON-YYYY’) – ’01-JAN-2019’ FROM DUAL; B. SELECT ROUND (SYSDATE – ’01-JAN-2019’) FROM DUAL; C. SELECT ROUND (SYSDATE – TO_DATE(‘01/JANUARY/2019’)) FROM DUAL; D. SELECT TO_DATE (SYSDATE, ‘DD/MONTH/YYYY’) – ‘01/JANUARY/2019’ FROM DUAL; E. SELECT SYSDATE – TO_DATE (’01-JANUARY-2019’) FROM DUAL; C and E are correct
upvoted 1 times
...
RaNik69
8 months, 3 weeks ago
Selected Answer: CE
SELECT TO_CHAR(SYSDATE, 'DD-MON-YYYY') - '01-JAN-2019' FROM DUAL; [Error] Execution (16: 44): ORA-01722: numero non valido; SELECT ROUND(SYSDATE - '01-gen-2019') FROM DUAL; [Error] Execution (16: 44): ORA-01722: numero non valido; SELECT ROUND(SYSDATE - TO_DATE('01/gen/2019')) FROM DUAL; 1576; SELECT TO_DATE(SYSDATE, 'DD/MONTH/YYYY') - '01/gennaio/2019' FROM DUAL; [Error] Execution (16: 44): ORA-01722: numero non valido; SELECT SYSDATE - TO_DATE('01-gennaio-2019') FROM DUAL; 1575,681400462962962962962962962962962963
upvoted 1 times
...
[Removed]
1 year, 4 months ago
C and E
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago