QUESTIONS AND ANSWERS WITH COMPLETE SOLUTIONS
GRADED A++
What does the expression date_years_difference (DOB, datetime_date (1, 1,
2014)) compute? (DOB stores date of birth.)
A. Age at JAN-01-2014.
B. Age at today's date.
C. It produces undefined ($null$) values because the order of arguments in the
datetime_date function is incorrect.
D. It produces undefined ($null$) values because the order of two functions must
be reversed.
Note: The following functions are used:
datetime_date (YEAR, MONTH, DAY). Returns the date value for the given YEAR,
MONTH, and DAY.
date_years_difference (DATE1, DATE2). Returns the difference in years from
DATE1 to DATE2.
C. The expression will yield undefined ($null$) values. The datetime_date function
needs arguments year, month, and day, in that order. Thus, the correct specification is
datetime_date (2014, 1, 1)) rather than datetime_date (1, 1, 2014)).
, Refer to the figure below. Which of the following statements are correct? (Select
all that apply.)
A. Four fields are derived, each being the difference in months between DATE1
and today's date, DATE2 and today's date, DATE3 and today's date, and DATE4
and today's date.
B. The term @FIELD in the expression references all fields listed in the Derive
from: area.
C. The new fields will be named DATE1_DIFFERENCE, DATE2_DIFFERENCE,
DATE3_DIFFERENCE, and DATE4_DIFFERENCE.
D. The expression will issue an error message, because the arguments of the
function @TODAY and @FIELD and must be in lower case.
A, B, C. The dialog box shows a multiple derive where four fields are derived. The
formula computes the difference in months between today and the respective source
fields, which are referenced by @FIELD. The new field name will be the concatenation
of the original field name and _DIFFERENCE, as suffix. The functions @TODAY and
@FIELD must be in upper case.
A dataset includes a field named E_MAIL_ADDRESS. Which of the following
expressions derive a flag field which returns true if E_MAIL_ADDRESS contains
at least one at sign @? (Select all that apply.)
A. locchar(`@`, 1, E_MAIL_ADDRESS) > 0
B. count_substring (E_MAIL_ADDRESS, "@") > 0
C. issubstring("@", E_MAIL_ADDRESS) > 0
D. E_MAIL_ADDRESS matches "@"