1z0-082 Exam QuestionsBrowse all questions from this exam

1z0-082 Exam - Question 86


You execute this query:

SELECT TO_CHAR(NEXT_DAY(LAST_DAY(SYSDATE), 'MON'), 'dd `Monday for` fmMonth rrrr')

What is the result?

Show Answer
Correct Answer: BC

The query executes the SELECT statement without a FROM clause, which is mandatory in SQL. Therefore, it generates an error. The correct syntax should include 'FROM DUAL' to ensure it runs successfully.

Discussion

12 comments
Sign in to comment
zouveOption: B
Aug 9, 2023

the correct query is SELECT TO_CHAR(NEXT_DAY(LAST_DAY(SYSDATE), 'MON'), 'dd "Monday for" fmMonth rrrr') FROM DUAL; I had this question also on the 1Z0-071 exam.

stevesOption: C
Sep 14, 2022

I think answer should be C. There is no from clause!

Wh0auOption: B
Oct 11, 2022

FROM DUAL; must be added after the query statement so answer is B

GuhborgesOption: B
Apr 1, 2023

The correc query: SELECT TO_CHAR(NEXT_DAY(LAST_DAY(SYSDATE), 'MON'), 'dd "Monday for" fmMonth rrrr') from dual; B is right.

BeomKOption: B
Apr 26, 2023

B is correct. SQL> SELECT TO_CHAR(NEXT_DAY(LAST_DAY(SYSDATE), 'MON'), 'dd "Monday for" fmMonth rrrr') from dual; TO_CHAR(NEXT_DAY(LAST_DAY(SYSDATE),'MON'),'DD"MONDAYFOR"FMMONTHRRRR') -------------------------------------------------------------------------------- 01 Monday for May 2023

stefan_aOption: C
Feb 1, 2023

C - it generates an error, even if FROM dual is added. SELECT TO_CHAR(NEXT_DAY(LAST_DAY(SYSDATE), 'MON'), 'dd `Monday for` fmMonth rrrr') returns ORA-00923: FROM keyword not found where expected SELECT TO_CHAR(NEXT_DAY(LAST_DAY(SYSDATE), 'MON'), 'dd `Monday for` fmMonth rrrr') FROM dual; returns ORA-01821: date format not recognized

Guhborges
Mar 13, 2023

It was probably a mistake when moving to the website, some characters are wrong. For me, the righ answers is B.

ivanadjOption: C
Mar 13, 2023

SELECT TO_CHAR(NEXT_DAY(LAST_DAY(SYSDATE), 'MON'), 'dd `Monday for` fmMonth rrrr') from dual; SELECT TO_CHAR(NEXT_DAY(LAST_DAY(SYSDATE), 'MON'), 'dd `Monday for` fmMonth rrrr') from dual * ERROR at line 1: ORA-01821: date format not recognized

musafirOption: C
Jul 31, 2023

C is correct since FROM DUAL is missing and ( 'Monday for') should actually be ("Monday for"). Could be an issue where the website didn't post the question correctly. I've seen this question in 071 exam which has the correct format but different answers. https://www.examtopics.com/discussions/oracle/view/32798-exam-1z0-071-topic-2-question-17-discussion/

8hyehye8Option: C
Mar 29, 2024

ORA-01846: 01846. 00000 - "not a valid day of the week"

Oracle2020Option: C
Apr 3, 2024

c is correct, because it generates an error, the query does not have the FROM keyword

SDXINOption: C
May 15, 2024

Tested on May 15, 2024 via below: https://livesql.oracle.com/apex/f?p=590:1:103395717088091:::RP::# Command: SELECT TO_CHAR(NEXT_DAY(LAST_DAY(SYSDATE), 'MON'), 'dd "Monday for" fmMonth rrrr') Error: ORA-00923: FROM keyword not found where expected Command: SELECT TO_CHAR(NEXT_DAY(LAST_DAY(SYSDATE), 'MON'), 'dd "Monday for" fmMonth rrrr') FROM DUAL Result: TO_CHAR(NEXT_DAY(LAST_DAY(SYSDATE),'MON'),'DD"MONDAYFOR"FMMONTHRRRR') 03 Monday for June 2024

khaleesi89Option: B
May 24, 2024

I had this question also on the 1Z0-071 exam taken on May 21, 2024 and the query was SELECT TO_CHAR(NEXT_DAY(LAST_DAY(SYSDATE), 'MON'), 'dd "Monday for" fmMonth rrrr') FROM DUAL; SO the correct answer in B.