Error Code 1722 Sqlstate 42000
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn ora-01722 invalid number error more about Stack Overflow the company Business Learn more about hiring developers or posting 01722. 00000 - "invalid number" ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community
Hibernate Sql Error 1722 Sqlstate 42000
Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Invalid number error - [Error Code: 1722, SQL State: 42000]
Ora-01722 Invalid Number Solution
ORA-01722: invalid number up vote -1 down vote favorite The 1st query from the below 2 queries is giving me [Error Code: 1722, SQL State: 42000] ORA-01722: invalid number error. But when I limit the no of records as in the 2nd query then it is running fine. Other than limiting the rows in the 2nd query, both the queries are identical. SELECT b.first_name, b.last_name, b.device_derived, b.ios_version_group, b.add_date, FIRST_VALUE ora-01722 invalid number to_char (b.add_date) OVER (PARTITION BY b.first_name, b.last_name, b.ios_version_group) AS first_date, LAST_VALUE (b.add_date) OVER (PARTITION BY b.first_name, b.last_name, b.ios_version_group) AS last_date FROM (SELECT a.first_name, a.last_name, a.os_version, a.device_type, a.device, a.add_date, a.device_derived, CASE WHEN ( ( UPPER (a.device_derived) = 'IPHONE' OR UPPER (a.device_derived) = 'IPAD') AND TO_NUMBER (SUBSTR (a.os_version, 1, 1)) > 4) THEN 'iOS ' || SUBSTR (a.os_version, 1, 1) ELSE 'Others' END AS ios_version_group FROM (SELECT first_name, last_name, os_version, device_type, device, add_date, CASE WHEN UPPER (device_type) = 'ANDROID' THEN 'Android' WHEN UPPER (device_type) = 'BB' OR UPPER (device_type) = 'BLACKBERRY' THEN 'Blackberry' WHEN UPPER (device_type) = 'IOS' AND ( SUBSTR (UPPER (device), 1, 6) = 'IPHONE' OR SUBSTR (UPPER (device), 1, 4) = 'IPOD') THEN 'iPhone' WHEN UPPER (device_type) = 'IOS' AND (SUBSTR (UPPER (device), 1, 4) = 'IPAD') THEN 'iPad' END AS device_derived FROM vw_mobile_devices_all) a) b; SELECT b.first_name, b.last_name, b.device_derived, b.ios_version_group, b.add_date, FIRST_VALUE (b.add_date) OVER (PARTITION BY b.first_name, b.last_name, b.ios_version_group) AS first_date, LAST_VALUE (b.add_date) OVER (PARTITION BY b.first_name, b.last_name, b.ios_version_group) AS last_date FROM (SELECT a.first_name, a.last_name, a.os_version, a.device_type, a.device, a.add_date, a.device_derived, CASE WHEN ( ( UPPER (a.device_derived) = 'IPHONE' OR UPPER (a.device_derived) = 'IPAD') AND TO_NUMBER (SUBSTR (a.os_version, 1, 1)) > 4) THEN 'iOS ' || SUBSTR (a.os_version, 1, 1) ELSE 'Others' END
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings
Ora 01722 Invalid Number Oracle Decode
and policies of this site About Us Learn more about Stack Overflow ora-01722 invalid number to_number the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags invalid number phone Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only http://stackoverflow.com/questions/29394114/invalid-number-error-error-code-1722-sql-state-42000-ora-01722-invalid-n takes a minute: Sign up sql error “ORA-01722: invalid number” up vote 41 down vote favorite 1 A very easy one for someone, The following insert is giving me the "ORA-01722: invalid number" error, why? INSERT INTO CUSTOMER VALUES (1,'MALADY','Claire','27 Smith St Caulfield','0419 853 694'); INSERT INTO CUSTOMER VALUES (2,'GIBSON','Jake','27 Smith St Caulfield','0415 713 598'); INSERT INTO CUSTOMER VALUES (3,'LUU','Barry','5 http://stackoverflow.com/questions/12549029/sql-error-ora-01722-invalid-number Jones St Malvern','0413 591 341'); INSERT INTO CUSTOMER VALUES (4,'JONES','Michael','7 Smith St Caulfield','0419 853 694'); INSERT INTO CUSTOMER VALUES (5,'MALADY','Betty','27 Smith St Knox','0418 418 347'); sql oracle plsql share|improve this question edited Sep 23 '12 at 6:44 a_horse_with_no_name 185k24233309 asked Sep 23 '12 at 1:24 Phillip Gibson 239133 19 So... what's the table definition for CUSTOMER? You've only given half the information needed. –Greg Hewgill Sep 23 '12 at 1:26 2 The telephone numbers are the only thing which might reasonably be a defined as a numeric which your data doesn't represent as a numeric (spaces aren't numeric). So: check your table definition and compare with your input statements. –APC Sep 23 '12 at 22:05 5 Why would people down vote this question. For people who are new to databases, this is a weird error. I can see how enclosing the values with quotes might make it look like it's a string. It just depends on what the database is setup as. It might all be strings or numbers just depends on the fields. Maybe it
Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.