nerdexam
Oracle

1Z0-061 · Question #294

Examine the structure of the PROMOS table: You want to generate a report showing promo names and their duration (number of days). If the PROMO_END_DATE has not been entered, the message 'ONGOING'…

The correct answer is B. SELECT promo_name, COALESCE(TO_CHAR(promo_end_date - promo_start_date), C. SELECT promo_name, NVL(TO_CHAR(promo_end_date -promo_start_date), 'ONGOING') FROM D. SELECT promo_name, DECODE(promo_end_date-promo_start_date, NULL, 'ONGOING'. See the full explanation below for the reasoning.

Question

Examine the structure of the PROMOS table:

You want to generate a report showing promo names and their duration (number of days). If the PROMO_END_DATE has not been entered, the message 'ONGOING' should be displayed. Which queries give the correct output? (Choose all that apply.)

Exhibit

1Z0-061 question #294 exhibit

Options

  • ASELECT promo_name, TO_CHAR(NVL(promo_end_date -promo_start_date, 'ONGOING')) FROM
  • BSELECT promo_name, COALESCE(TO_CHAR(promo_end_date - promo_start_date),
  • CSELECT promo_name, NVL(TO_CHAR(promo_end_date -promo_start_date), 'ONGOING') FROM
  • DSELECT promo_name, DECODE(promo_end_date-promo_start_date, NULL, 'ONGOING',
  • ESELECT promo_name, ecode(coalesce(promo_end_date, promo_start_date), null, 'ONGOING',

How the community answered

(28 responses)
  • A
    7% (2)
  • B
    86% (24)
  • E
    7% (2)

Community Discussion

No community discussion yet for this question.

Full 1Z0-061 Practice