Exam 1z0-071 All QuestionsBrowse all questions from this exam
Question 60

The INVOICE table has a QTY_SOLD column of data type NUMBER and an INVOICE_DATE column of data type DATE.

NLS_DATE_FORMAT is set to DD-MON-RR.

Which two are true about data type conversions involving these columns in query expressions? (Choose two.)

    Correct Answer: A, B

    When considering data type conversions in query expressions, implicit conversions happen automatically without explicit cast functions, whereas explicit conversions require the use of functions like TO_DATE or TO_NUMBER. For the given options, 'invoice_date = '15-march-2019'' uses implicit conversion as Oracle automatically converts the string '15-march-2019' to a DATE type because it matches the DD-MON-RR format. Similarly, 'qty_sold BETWEEN '101' AND '110'' uses implicit conversion since Oracle can implicitly treat string literals '101' and '110' as numbers in the context of a numeric comparison. Therefore, both options A and B involve implicit data type conversions.

Discussion
NennuzzoOptions: AB

AB are correct, I tested it.

ArslanAltaf

ABC are correct

Bertrand_dokOptions: BE

A and C can't work because it doesn't match the NLS date format, D works fine by implicit conversion , so it's BE

yanoolthecool

E says 'explicit' did you see any conversion function? A works, as MON is for the full month name and RR.. just google it.

799f3be

why is E wrong?

a947739

SELECT CONCAT(sal,hiredate) from emp; try this , it doesn't need explicit conversion

Monesha_GanesanOptions: CD

C. invoice_date > '01-02-2019': This statement uses implicit conversion. The date string is implicitly converted to a DATE type using the default date format. D. qty_sold = '0554982': This statement requires explicit conversion. You need to explicitly convert the string to a NUMBER to compare it with the QTY_SOLD column.

MooonLight

Can anyone please explain the correct answers? not quite getting the sense... thank you.

kuff

A. Implicit conversion can be done as string matches the NSL_DATE_FORMAT. B. Implicit conversion to number C. Can't use implicit conversion as string doesn't match NSL_DATE_FORMAT D. Doesn't require explicit conversion E. Doesn't require explicit conversion

lucemqy

but the month is spelled out isn't MON the three letter abbreviation of the month?