oracle

Why is no_data_found ORA-01403 an exception in Oracle?

If the SELECT INTO statement doesn't return at least one row, ORA-01403 is thrown. For every other DBMS I know this is normal on a SELECT. Only Oracle treats a SELECT INTO like this. CREATE OR REPLACE PROCEDURE no_data_proc IS dummy dual.dummy%TYPE; BEGIN BEGIN SELECT dummy INTO dummy FROM dual WHERE d...

Oracle Spool adds extra LF

Hi. I have a Spool of a Select as : SET SERVEROUTPUT ON WHENEVER SQLERROR EXIT 1 set heading off set feedback off set termout off set echo off set verify off set pagesize 0 set line 1000 set trimspool on spool &1 SELECT '9' || 'c' || chr(10) || myColumn FROM myTable; spool off set feedback on; set term on; exit; The problem is ...

Calling Oracle stored procedure from C#.net?

I just started reading about stored procedures. Can anyone please help me call a stored procedure in oracle from C# Thanks in advance ...

ADO.NET (ODP.NET) and same Connection pool for different clients connection

We have to implement a two tier architecture to distribute a cache from a central Oracle DB to a lot of clients (circa 200) into an Intranet. After some experimentations we have opted to use a direct connection from the client to the DB server. This decision has been taken to simplify the architecture and to reduce the overheads. Client...

Stopping SQL code execution

We have a huge Oracle database and I frequently fetch data using SQL Navigator (v5.5). From time to time, I need to stop code execution by clicking on the Stop button because I realize that there are missing parts in my code. The problem is, after clicking on the Stop button, it takes a very long time to complete the stopping process (so...

How to search data from oracle database which contains single quote.

Hi All, i have one table my_table,which contains three columnn namely name,address1,address2. Now i want to search a data from these 3 column which contains single quote. Can anybody suggest. Thanks in advance. ...

sql parser(change parsing method)

I have one select: select * from table1 where col1=10; and another select: select * from table1 where col1=11; Sql parser parses them as different sqls.. I want to make SQL PARSER parse the statement once and just change the parameter in the where clause..Can I do that? Do have any idea ? please share it with me.. thanks a lot. P....

Increment special chapter on index (book index style - 1.2.3.2) by sql

Hi I have a column holding a varchar2 value in book index style - means something like 1.2.3.2.1 I need a to incement a special chapter for recursive select. I want to match 1.2.1 with 1.3.1 and 1.2.2 with 1.3.2 and so on. I am wondering if this can be done without making a pl/sql function. I have tried to do this by regexp but no suc...

ODP .NET AQ Getting Exception Messages Queue

How can I dequeue Exception Messages from a Oracle Message Queue using ODP? I'm using the default queue for exceptions. Thanks!! ...

Entity Framework 4 with Oracle

I installed the ODP 11 lateset version, which suposed to wupport EF4. But when i'm trying to add entity data model in the VS2010, I don't have the option to select Oracle Database. Is there anything else i need to do? Also, I have running on my pc Oracle Express 10g - Is the 11 ODP will work with this DB? ...

Simple regular expression in Oracle

I have a table with the following values: ID NAME ADDRESS 1 Bob Super stree1 here goes 2 Alice stree100 here goes 3 Clark Fast left stree1005 4 Magie Right stree1580 here goes I need to make a query using LIKE and get only the row having stree1 (in this case only get the one wit...

SQL Plus and www.apex.oracle.com

Does the SQL syntax differ in any way for SQL Plus and apex.oracle.com From this article I can assume that it doesn't, but I want to be sure. Is SQL Plus only an environment that is able to connect to an Oracle server ? I'm asking this because I just started learning Oracle's SQL syntax and I don't have access to my faculty's server fro...

Problem with php+oracle(OCI)

Catchable fatal error: Object of class OCI-Collection could not be converted to string in E:\php\htdocs\PHPRPC\func.php on line 318 The code: $sql='BEGIN NCCM_INTERFACE_HISDETAIL(:orgcode,:inhiscode,:inputer,:items); END;'; $conn=oci_connect('chis','chis123','ORCL','UTF8'); $stmt = oci_parse($conn, $sql); $collection = oci_new_collecti...

installing oracle 11g in ubuntu 10.10

i'm trying to install oracle 11g database in my ubuntu 10.10, following this tutorial http://oracleabc.com/b/archives/167 but, at the step 11, the system asks for oracle password! which password is it? i did not set anything yet! i've tried 'oracle', 'password', , (my system's) root password, but doesn't work! are there some 'default pa...

Java as back-end platform. Good choice?

Hello, My company is about to start building the back-end for one of our new products. The idea is to build a layer that produces resources for every upper layer product (web site, mobile web site, mobile application), also, a significant part of it will be made available as an API for third party developers. You know, the typical start...

Oracle 11g R2 Install Guide

Hi, I have a need to install Oracle 11g R2 on Windows Server 2008 R2. I have downloaded the two files from Oracle (win64_11gR2_database) and the client (win64_11gR2_client). Does anyone have a guide or step by step to sucessfully setup Oracle? My goal is to connect to the database from Visual Studio 2010. Thanks ...

Could table-returning select Oracle query from stored procedure be transformed into LINQ?

Could this Oracle query:select * from table(some_stored_procedure(someParameter => :someValue) be transformed into LINQ? ...

Getting seconds between two Oracle Timestamps

Tom Kyte suggests to use EXTRACT to get the difference: extract( day from (x-y) )*24*60*60+ extract( hour from (x-y) )*60*60+ ... This seems to be harder to read and slower than this, for example: ( CAST( x AS DATE ) - CAST( y AS DATE ) ) * 86400 So, what is the way to get the difference between two Timestamps in seconds? Thanks!...

Performance of query without using OR clause

I am facing a problem. I have one query Select * from tabA where (a) in (a,b,c) OR b in (a,b,c) I want to facing performance issue due to this query as I need to remove the or condition , so I tried with the following query: Select * from tabA where (a,b) in (a,b,c) but this query seems not to work, please help. I dont want to...

What is the best way to parameterize a LIKE query?

I'm trying to implement a simple search, using LIKE in my SQL statement: Using cmd As New OracleCommand cmd.Connection = conn cmd.CommandType = CommandType.Text cmd.CommandText = "select * from TABLE where FIELD like '%:text%'" cmd.Parameters.AddWithValue("text", searchValue) ...