If you are receiving ORA-1002 I suspect that you are using ODBC, and if so, you need to update your ODBC driver. The standard 8.1.7.4 ODBC driver does not allow you to control the autocommit nature of ODBC. Go to otn.oracle.com and click on Downloads. Under the 'Drivers' section click on ODBC. There you will find the 8.1.7.8.10 ODBC driver which will probably correct your ORA-1002 error. Jared "Saira Somani-Mendelin" <saira_somani@xxxxxxxxx> Sent by: oracle-l-bounce@xxxxxxxxxxxxx 03/19/2004 07:40 AM Please respond to oracle-l To: <oracle-l@xxxxxxxxxxxxx> cc: Subject: RE: Create view using CAST to change datatype I should also mention that along with the ORA-01722 error, I am also receiving the ORA-01002: Fetch out of sequence error. FYI, we are using version 8.1.7.4 and I am using TOAD on w2k pro. -----Original Message----- From: oracle-l-bounce@xxxxxxxxxxxxx [mailto:oracle-l-bounce@xxxxxxxxxxxxx] On Behalf Of Saira Somani-Mendelin Sent: March 19, 2004 10:35 AM To: oracle-l@xxxxxxxxxxxxx Subject: RE: Create view using CAST to change datatype I'm not sure why I'm leaning towards CAST...(I claim ignorance!) In any case, I tried methods, both yours and Igor's, and received the same error: ORA-01722: invalid number Somewhere in this table, there is a strange value. I was trying to make life simpler without having to create multiple views to deal with these data value issues (filter the view by some criteria). So here's another question (just out of curiosity), how can I determine which value is causing me problems? Thanks for all your help so far! I appreciate the time. Saira -----Original Message----- From: oracle-l-bounce@xxxxxxxxxxxxx [mailto:oracle-l-bounce@xxxxxxxxxxxxx] On Behalf Of Mercadante, Thomas F Sent: March 19, 2004 10:10 AM To: 'oracle-l@xxxxxxxxxxxxx' Subject: RE: Create view using CAST to change datatype Saira, This worked: CREATE OR REPLACE VIEW tomview AS SELECT col1, col2, cast(NVL(RTRIM(col1),0) AS NUMBER) col1_numb FROM tomtest Values for the TOMTEST table were (' ',1); SELECT * FROM tomview returns values of (' ', 1, 0) And I agree wih Igor - why are you using CAST rather than to_number? Tom Mercadante Oracle Certified Professional ---------------------------------------------------------------- Please see the official ORACLE-L FAQ: http://www.orafaq.com ---------------------------------------------------------------- To unsubscribe send email to: oracle-l-request@xxxxxxxxxxxxx put 'unsubscribe' in the subject line. -- Archives are at //www.freelists.org/archives/oracle-l/ FAQ is at //www.freelists.org/help/fom-serve/cache/1.html ----------------------------------------------------------------- ---------------------------------------------------------------- Please see the official ORACLE-L FAQ: http://www.orafaq.com ---------------------------------------------------------------- To unsubscribe send email to: oracle-l-request@xxxxxxxxxxxxx put 'unsubscribe' in the subject line. -- Archives are at //www.freelists.org/archives/oracle-l/ FAQ is at //www.freelists.org/help/fom-serve/cache/1.html -----------------------------------------------------------------