oracle

default value, oracle sp call

I have an oralcle SP forced on me that will not accept an empty parameter in an update. So if I wanted to set a value back to the default of ('') it will not let me pass in the empty string. Is there a keyword you can use such as default, null, etc that oracle would interpret back to the default specified for a particular column? ...

Oracle DDL in autonomous transaction

I need to execute a bunch of (up to ~1000000) sql statements on an Oracle database. These statements should result in a referentially consistent state at the end, and all the statements should be rolled back if an error occurs. These statements do not come in a referential order. So if foreign key constraints are enabled, one of the stat...

Default Schema in Oracle Connection URL

I'd like to set default database schema in Oracle Connection URL jdbc:oracle:thin:@<server>:<port1521>:<sid> My sample SQL statement: select monkey_name from animals.monkey I need to query database without schema prefix anymals. i.e. when I run this statement select monkey_name from monkey it will uses animals schema by default....

Oracle syntax error

I got the following error in Oracle: SELECT * FROM abcd WHERE name LIKE 'a%' LIMIT 10 * ERROR at line 1: ORA-00933: SQL command not properly ended What is the problem with the command? ...

How to get all returned lines with each oracle errror message into one variable using perl

How do i get all of the lines of "$dblink is down" into one $l_msg string? Ideally I would like to get the error returned by oracle on failure and I cannot see a way to solve this. my $dblinks = $l_dbh->selectcol_arrayref("select dbname from db_link"); for my $dblink (@$dblinks) { my $l_results = eval { my ($l_erg) = $l_dbh->s...

Update single data row from table to another

How can I update a complete data row by using a data row from another table. Example: Table A ID | NAME | ... | ---------------------------- 1 | Test | ... | 2 | Test2 | ... | Table B ID | NAME | ... | ---------------------------- 1 | Test97 | ... | So I want to copy the con...

Dealing with eacute and other special characters using Oracle, PHP and Oci8

Hi I am trying to store names into an Oracle database and fetch them back using PHP and oci8. However, if I insert the é directly into the Oracle database and use oci8 to fetch it back I just receive an e Do I have to encode all special characters (including é) into html entities (ie: &eacute;) before inserting into database ... or am ...

Using a sequence on an existing table

I've got a table that people have been inserting into getting the primary key by doing a SELECT max(id)+1 from table_a; I want to add some records to that table using a INSERT INTO table_a SELECT ... FROM table_b, table_c ... simple SQL script, and I'm wondering how to generate the primary keys. My first thought was to create a temp...

Report Builder 2.0 or Oracle string aggregation

In Report Builder 2.0, I'm trying to create a table with data like the following: Person | StrID's ------------------- Jim | a, b, c, d Mary | h, k Sue | l, m, p, z The problem is that my Oracle SQL query returns data in the following format: Person | StrID -------------- Jim | a Jim | b Jim | c Jim | d Mary | h...

Passing Null/empty string to Oracle stored procedure from asp.net

We have an ASP.NET web service that invokes a stored procedure on our DB (Oracle 11g). The problem is that the call to the procedure blows up every time an empty string is passed as one of the parameters. We're seeing an ORA-01084 error, which indicates to me that call is failing before the procedure is actually run. Here's the proced...

Looking for a SQL-based RDBMS with a Windows GUI

I have an application I developed 20 years ago with INFORMIX-SQL version 2.10 for MS-DOS 5.0. I have it working on MS-DOS 6.22, within Microsoft Virtual PC 2007, under Windows Vista, but I would like to re-write this application with a WINDOWS-based RDBMS. I'm looking for a product, similar in functionality to informix-sql, but for wind...

Regarding Execute Immediate in stored procedure

I am having the below statement from stored procedure. It's giving Insufficient Privileges. But If i run the create statement alone from the sql prompt it's creating table. execute immediate 'create table TEST_ABC( NO_AC NUMBER(8) , ILL_PER VARCHAR2(15) , INIT_C DATE ...

An Application interfaced with mobile..

I have an idea to design an application which is interfaced with a mobile. The application has to note down each and every transactions happening in the mobile like making a note of all incoming messages and store appropriate information in the application's database to perform manipulations. Is this possible ? Can you suggest me an appr...

Run Oracle Forms as standalone without browser

I want to run Oracle Forms standalone without any web-browser with java plugin. Is there a way to call a compiled .fmx form directly via some java application or by calling the forms-JAR-files with some parameters? CU, Arne ...

Call Oracle Storage Procedure with a record as parameter

Hi everyone, is it possible to call an oracle storage procedure with a record type as IN parameter. In Oracle I have a record definition: TYPE R_InData_tab IS RECORD ( ... ); TYPE InData_tab IS TABLE OF R_InData_tab INDEX BY BINARY_INTEGER; Now I want to set this record type as parameter: PROCEDURE myProcedure (inRecord IN myPackage....

Which Oracle table uses a sequence?

Having a sequence, I need to find out which table.column gets its values. As far as I know, Oracle doesn't keep track of this relationship. So, looking up for the sequence in source code would be the only way. Is that right? Anyone knows of some way to find out this sequence-table relationship? ...

java.sql.SQLException: Io exception: Got minus one from a read call during JDBC connection with oracle

Hi I am new to java when I tried to connect oracle with my java sample code I got the above exception My Code is import java.sql.*; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; publ...

Can't update Oracle IOT table with jbdc updateRow method

Hello. I have Oracle 10gR2 database with IOT table within: create table countries ( id number primary key, name varchar2(30) not null enable ) organization index; I try to update table values with this Java (version 1.6) code: Statement stmt = conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_U...

How to determine MAXSIZE of existing tablespace in Oracle

I need to determine the MAXSIZE that was set for a tablespace when it was created (Oracle 10g) I'm sure I'm missing something obvious, but the information isn't immediately apparent in the information in DBA_TABLESPACES ...

Validating User Oracle Passwords for Reset application

This is a mix of programming and sysadmin but I decided its more of a programming issue. Currently working building a password management web application for managing Oracle user accounts (C#). The scope calls for verification of the users Oracle username and password before they're allowed to set a new password. Without creating a tab...