Examine the structure and data in the PRIC E_LIST table: Name Null?

Examine the structure and data in the PRIC E_LIST table: Name Null? Type ————
————- ——————- PROD_D NOT NULL NUMBER(3) PROD_PRICE VARCHAR2(10)
PROD_ID PROD PRICE ———– ———————— 100 $234.55 101 $6,509.75 102
$1,234 in the same format as the PROD_PRICE. Which SQL statement would give the
required result?

Examine the structure and data in the PRIC E_LIST table: Name Null? Type ————
————- ——————- PROD_D NOT NULL NUMBER(3) PROD_PRICE VARCHAR2(10)
PROD_ID PROD PRICE ———– ———————— 100 $234.55 101 $6,509.75 102
$1,234 in the same format as the PROD_PRICE. Which SQL statement would give the
required result?

A.
SELECT TO_NUMBER(TO_NUMBER(prod_price.,$99.999.99′)* .25/$99.999.00′) FROM
PRICE_LIST:

B.
SELECT TO_CHAR(prod_price* .25.’$99.999.99′) FROM PRICEJLIST:

C.
SELECT TO_CHAR(TO_NUMBER(prod_price)* .25.’$99.999.00′) FROM PRICE_LIST;

D.
SELECT TO_CRAR(TO_NUMBER(prod_price.’S99.999.99′)* .25.’$99.999.00′) FROM
PRICE_LIST:



Leave a Reply 1

Your email address will not be published. Required fields are marked *


Luca

Luca

https://docs.oracle.com/cd/B28359_01/olap.111/b28126/dml_functions_2117.htm

TO_NUMBER(text-exp, [fmt,] [nlsparams])

fmt
A text expression that identifies a number format model. This model specifies how the conversion to NUMBER should be performed. For information about number format models, see Oracle Database SQL Language Reference.

The default number format identifies a period (.) as the decimal marker and does not recognize any other symbol.