OCP认证题:11g-1Z0-051-v9.02-010题
最新学讯:近期OCP认证正在报名中,因考试人员较多请尽快报名获取最近考试时间,报名费用请联系在线老师,甲骨文官方认证,报名从速!
我要咨询OCP认证题:11g-1Z0-051-v9.02-010题 完整题库请点击这里联系老师咨询了解
10. View the Exhibit; e xamine the structure of the PROMOTIONS table.
Each promotion has a duration of at least seven days .
Your manager has asked you to generate a report, which provides the weekly cost for each promotion
done to l date.
Which query would achieve the required result?
A. SELECT promo_name, promo_cost/promo_end_date-promo_begin_date/7
FROM promotions;
B. SELECT promo_name,(promo_cost/promo_end_date-promo_begin_date)/7
FROM promotions;
C. SELECT promo_name, promo_cost/(promo_end_date-promo_begin_date/7)
FROM promotions;
D. SELECT promo_name, promo_cost/((promo_end_date-promo_begin_date)/7)
FROM promotions;
Answer: D
试题解析:
提要要求:报表提供促销期间每周的成本
D,正确,符合题意。
ABC语法错误
sh@TEST0924> SELECT promo_name, promo_cost/promo_end_date-promo_begin_date/7 FROM promotions;
SELECT promo_name, promo_cost/promo_end_date-promo_begin_date/7 FROM promotions
*
ERROR at line 1:
ORA-00932: inconsistent datatypes: expected NUMBER got DATE
sh@TEST0924> SELECT promo_name,(promo_cost/promo_end_date-promo_begin_date)/7 FROM promotions;
SELECT promo_name,(promo_cost/promo_end_date-promo_begin_date)/7 FROM promotions
*
ERROR at line 1:
ORA-00932: inconsistent datatypes: expected NUMBER got DATE
sh@TEST0924> SELECT promo_name, promo_cost/(promo_end_date-promo_begin_date/7) FROM promotions;
SELECT promo_name, promo_cost/(promo_end_date-promo_begin_date/7) FROM promotions
*
ERROR at line 1:
ORA-00932: inconsistent datatypes: expected NUMBER got DATE