Which SQL statements would display the value 1890.55 as $1,890.55? (Choose three .)
A.
SELECT TO_CHAR(1890.55,’$0G000D00′)
FROM DUAL;
B.
SELECT TO_CHAR(1890.55,’$9,999V99′)
FROM DUAL;
C.
SELECT TO_CHAR(1890.55,’$99,999D99′)
FROM DUAL;
D.
SELECT TO_CHAR(1890.55,’$99G999D00′)
FROM DUAL;
E.
SELECT TO_CHAR(1890.55,’$99G999D99′)
FROM DUAL;
why is C incorrect???
B is also correct answer if not so then can anyone explain it
B is incorrect answer sorry for inconvenience
why option C incorrect.
i think we should use . and ,or G and D
we can’t use , and D.what do you think?
C is incorrect because you cannot mix up in one format of a number coma, dot with G and D. It needs to be or coma and dot or D and G. Not
coma and D, not G and dot etc.
Have Justyna I have around 5 Question can’t find answers for among all 300. Could you please help me?
This is my email: [email protected]
anyone explain it.why A,D,E correct answer
Here you can see available format models
http://docs.oracle.com/cd/B28359_01/server.111/b28286/sql_elements004.htm
Rules:
‘G’ stands for Comma.
‘D’ stands for Dot.
‘V’ removes the Dot.
‘,’ cannot be used with ‘D’.
eg: ‘$99,999D99’ is invalid.
‘$99G999D99’ is valid.
Description
, (comma)
9,999
Returns a comma in the specified position. You can specify multiple commas in a number format model.
Restrictions:
A comma element cannot begin a number format model.
A comma cannot appear to the right of a decimal character or period in a number format model.
http://docs.oracle.com/cd/B28359_01/server.111/b28286/sql_elements004.htm#SQLRF51060
V example: 999V99
Returns a value multiplied by 10n (and if necessary, round it up), where n is the number of 9’s after the V.
Hi Alis,
is it valid dump as i have exam soon
A,D,E
SQL> select to_char(1890.55, ‘$0G000D00’) from dual;
TO_CHAR(18
———-
$1,890.55
SQL> select to_char(1890.55, ‘$9,999V99’) from dual;
TO_CHAR(1
———
$1,89055
SQL> select to_char(1890.55, ‘$9,999D99’) from dual;
select to_char(1890.55, ‘$9,999D99’) from dual
*
ERROR at line 1:
ORA-01481: invalid number format model
SQL> select to_char(1890.55, ‘$99,999D99’) from dual;
select to_char(1890.55, ‘$99,999D99’) from dual
*
ERROR at line 1:
ORA-01481: invalid number format model
SQL> select to_char(1890.55, ‘$99D999D00’) from dual;
select to_char(1890.55, ‘$99D999D00’) from dual
*
ERROR at line 1:
ORA-01481: invalid number format model
SQL> select to_char(1890.55, ‘$99G999D00’) from dual;
TO_CHAR(189
———–
$1,890.55
SQL> select to_char(1890.55, ‘$99G999D99’) from dual;
TO_CHAR(189
———–
$1,890.55
Estudio, le gustó, gracias gracias por ello
http://www.opinionesdating.com/meetic-opiniones/
Yes! Finally someone writes about %keyword1%.|
Great blog.Thanks Again. Will read on…