oracle10g

Retrieving Data From Returned Oracle Timestamp Column

我是研究僧i 提交于 2021-02-20 09:57:47
问题 We have a ColdFusion 8 (Linux) application that uses an Oracle timestamp. We just converted to Oracle 11g from 10g and we're now using Oracle's thin client on the data sources. We're getting an error in the application where a timestamp column is selected. It seems as though an object of class oracle.sql.TIMESTAMP is being returned. I verified this by dumping the contents of the column. Sure enough, it gives me a break down of the object's methods and their return types. But, I can't seem to

ORA-00933: SQL command not properly ended -

和自甴很熟 提交于 2021-02-17 05:47:46
问题 public void updateweeks(string getdate) { string result = getdate.Substring(0, 10); OracleConnection con; OracleCommand cmd; con = new OracleConnection(strConnectionString); cmd = con.CreateCommand(); cmd.CommandText = "UPDATE MO_T_WEEK_REPORT SET C_ISACTIVE ='N' where TO_CHAR(TO_DATE(C_DATE,'DD/MM/YY hh24:mi:ss'),'DD/MM/YY')=TO_CHAR(TO_DATE('"+result+"','DD/MM/YY hh24:mi:ss'),'DD/MM/YY');"; con.Open(); cmd.ExecuteNonQuery(); con.Close(); } In the above code to raise the Exception for "ORA

ERROR ON QUERYING ORACLE DB

谁都会走 提交于 2021-02-11 16:51:30
问题 I am using oracle 10g and I wrote a create table query like this - String UserTable="CREATE TABLE UserDetail ( \n" + " idNo INT(64) NOT NULL , \n" + " name VARCHAR(50),\n" + " email VARCHAR(50), \n" + " state VARCHAR(50),\n"+ " country VARCHAR(50),\n" + " CONSTRAINT person_pk PRIMARY KEY ('idNo')" + ");"; // Connection con2=DriverManager.getConnection(DbAddress,"vivek","123456"); PreparedStatement st2=conn.prepareStatement(UserTable); st2.executeUpdate(); conn.close(); but it gives following

Pagination custom query fetch first N rows error [duplicate]

瘦欲@ 提交于 2021-02-11 13:41:33
问题 This question already has answers here : How ROWNUM works in pagination query? (3 answers) How do I limit the number of rows returned by an Oracle query after ordering? (15 answers) SQL (ORACLE): ORDER BY and LIMIT [duplicate] (1 answer) Alternatives to LIMIT and OFFSET for paging in Oracle [duplicate] (4 answers) Closed 11 months ago . I have such a long query like this in Oracle 10g (needed for custom pagination). SELECT * FROM ( SELECT FILTERED_ORDERED_RESULTS.*, COUNT(1) OVER() TOTAL

Oracle query Round up or down to nearest 15 minute interval

混江龙づ霸主 提交于 2021-02-11 12:44:49
问题 08-SEP-20 08:55:05 08-SEP-20 15:36:13 The query below is working correctly for 15:36:13 in that it rounds to 15:30 but the 8:55:05 is rounding down to 08:45 when it should be rounding to 09:00 select event_date,trunc(event_date,'mi') - numtodsinterval( mod(to_char(event_date,'mi'),15), 'minute' ) as nearest_quarter from time_source_in_all where empno = '002307718' and event_date between '8-sep-2020' and '9-sep-2020' 回答1: You can use: SELECT event_date, TRUNC( event_date, 'HH' ) + ROUND(

Edit the control file in Oracle 10g Release 2

烂漫一生 提交于 2021-02-11 07:59:11
问题 I tried to clone an oracle database server to another oracle database server. After I completed the cloning, when I tried connecting to the database by starting SQL Plus I got the following errors: ORA-01157: cannot identify/lock data file 1 - see DBWR trace file ORA-01110: data file 1: '/home/oracle/oradata/ccisv2/system01.dbf' I found that while cloning the control file of the original database location also got cloned. Now in the new server I have the data files located at a different

Oracle TNS Permission Denied *

ε祈祈猫儿з 提交于 2021-02-08 14:41:26
问题 I'm using: CentOS 6.7 Zend.1.2.15 using oci8, using instantclient 11.2 x64 PHP 5.4.45 Trying to connect to an Oracle: Oracle Database 10g Release 10.2.0.4.0 Already checked credentials, already tried to connet to other Oracle server but the error still the same: 12546 ORA-12546: TNS:permission denied * Already gave 0777 permission to /usr/local/oracle/11.2/client64/ following some answer around but none of them solved. Server does not have the IP in any sort of blacklist. The same code runs

Oracle TNS Permission Denied *

寵の児 提交于 2021-02-08 14:41:08
问题 I'm using: CentOS 6.7 Zend.1.2.15 using oci8, using instantclient 11.2 x64 PHP 5.4.45 Trying to connect to an Oracle: Oracle Database 10g Release 10.2.0.4.0 Already checked credentials, already tried to connet to other Oracle server but the error still the same: 12546 ORA-12546: TNS:permission denied * Already gave 0777 permission to /usr/local/oracle/11.2/client64/ following some answer around but none of them solved. Server does not have the IP in any sort of blacklist. The same code runs

ODP.net Oracle Decimal Number precision problem when filling a dataset. Exception: Arithmetic operation resulted in an overflow

故事扮演 提交于 2021-02-07 11:28:43
问题 I am working in c# .net 2 (Visual Studio 2005 SP1) attempting to fill a dataset with the results from a select * from table from an Oracle10g database. The .net framework, IDE and database cannot be changed at this client site. I'm connecting using the ODP.net provider the dll version is 2.102.2.20 When I run the fill command I get an Exception: Arithmetic operation resulted in an overflow Also if I attempt to view the offending column in the Visual Studio designer (Show Table Data) I get for

create a procedure that retrieves all indexes on my table and rebuilt

戏子无情 提交于 2021-02-07 07:43:44
问题 I want to create a procedure that retrieves all indexes on my table and rebuilt i retrieves all indexes with this query: select index_name from user_indexes where table_name='your_table_name' and i rebuilt with this query: alter index <index_name> rebuild; Thx. 回答1: create or replace procedure rebuild_indexes( p_owner in varchar2, p_table_name in varchar2 ) as begin for indexes_to_rebuild in ( select index_name from all_indexes where owner = p_owner and table_name = p_table_name ) loop