From Oracle Database 12c Release 2
you could use TO_NUMBER with DEFAULT ... ON CONVERSION ERROR
:
SELECT TO_NUMBER('*' DEFAULT 0 ON CONVERSION ERROR) AS "Value"
FROM DUAL;
Or CAST
:
SELECT CAST('*' AS NUMBER DEFAULT 0 ON CONVERSION ERROR) AS "Value"
FROM DUAL;
More Related Contents:
- ANYONE CAN TELL ME THAT WHY THIS CODE IS GIVING ME AN ERROR OF TABLE OT CLUSTER KEY WORD IS MISSING? [closed]
- How do I escape a reserved word in Oracle?
- How to put more than 1000 values into an Oracle IN clause [duplicate]
- ORA-30926: unable to get a stable set of rows in the source tables
- ORA-12514 TNS:listener does not currently know of service requested in connect descriptor
- Fetch Oracle table type from stored procedure using JDBC
- ORA-01017 Invalid Username/Password when connecting to 11g database from 9i client
- Using the “IN” clause with a comma delimited string from the output of a replace() function in Oracle SQL
- NLS_NUMERIC_CHARACTERS setting for decimal
- Oracle JDBC and Oracle CHAR data type
- What is the minimal setup required to deploy a .NET application with Oracle client 11?
- Does Oracle have an equivalent of SQL Server’s table variables?
- check if “it’s a number” function in Oracle
- Reason why oracle is case sensitive?
- ORA-12170: TNS:Connect timeout occurred
- Faster alternative in Oracle to SELECT COUNT(*) FROM sometable
- How to create and use temporary table in oracle stored procedure?
- Oracle date difference to get number of years
- SQL*Plus how to accept text variable from prompt?
- How to find difference b/w TIMESTAMP format values in Oracle?
- SQL Fiddle Output Error
- oracle PL/SQL how to calculate range ip for IPv6 cidr
- Trying to export a Oracle via PL/SQL gives a date of 0000-00-00
- Oracle: how to add minutes to a timestamp?
- How to drop multiple interval partitions based on date?
- How to list active / open connections in Oracle?
- ORA-01830: date format picture ends before converting entire input string / Select sum where date query
- How to generate a version 4 (random) UUID on Oracle?
- Find out the history of SQL queries
- How to test an Oracle Stored Procedure with RefCursor return type?