oracle

Oracle OCI: Problem in Query with Date field

Client compiled with OCI: 10.2.0.4.0 Server: Oracle9i Enterprise Edition Release 9.2.0.4.0 The problematic query is: SELECT CODIGO FROM LOG WHERE TEL = :telnumber AND DATE_PROC = '05-JUL-08' Table description: SQL>describe LOG; TEL NOT NULL VARCHAR2(15) CODIGO NOT NULL VARCHAR2(20) DATE_PROC NOT NULL DATE As simple as it might loo...

Oracle 9i - Convert Varchar2 to javascript escaped UTF-8?

Hi, I need to write a plsql function that will take a varchar2 column containing Polish national characters to escaped UTF-8, which will be then used in javascript, So I need to convert: zażółć gęślą jaźń to: za\u017c\u00f3\u0142\u0107 g\u0119\u015bl\u0105 ja\u017a\u0144 To be exact, my goal is to build a json encoder directly i...

In Oracle, why can´t I select rownum in a outer query, when my inner query contains SDO_ANYINTERACT?

I have written a query in Oracle that looks like this: select ID, NAME, GEOMETRY from ( select a.*, rownum as rnm from ( select ID, NAME, GEOMETRY from MY_TABLE where SDO_ANYINTERACT(GEOMETRY, SDO_UTIL.SDO_GEOMETRY('POLYGON ((670000 6268000, 670000 6269000, 700000 6269000, 700000 6268000, 670000 6268000))')) = '...

How to compare values for last and second last entry in table?

I have a table in Oracle called quotes with two columns: date and value. I would like to compare values for last entry and second last entry in the table. In this example I would like to get dates for 13.1 and 11.1 in one line and the difference between the values for each date (10-5=5). Quotes Table: Date - Value 13.1.2010...

No username when Oracle Forms calls Solaris shell script

Our application has a couple of shell scripts that are called from web-based Oracle Forms 10g, running on multiple Solaris 10 servers. We've discovered recently that the shell scripts are not running with the full permissions of the OAS user account that runs the forms. I added a echo User is $USER command to one script to display the ...

Pulling Master-Detail data from Oracle w/o separate lines for detail

Okay, I tried searching around, but couldn't come up with a decent idea on what to query on, so I figured I'd post a question. How can I pull back master/detail information without having the master data duplicated along with every line of detail data? Given the following scenario: Master - Cars ============= decimal car_id (pk) stri...

Connecting to Oracle 8.1.7 - how to get the right ODBC driver?

I have a Vista machine that needs to remotely connect to Oracle 8.1.7 database. Installing the instant client with the ODBC pack gets an ODBC driver, but when you create a datasource with it, it says it's no longer compatible with that database version. What's the best way to get the correct ODBC driver? ...

Oracle.Dataaccess error ORA-06502: PL/SQL: numeric or value error: character string buffer too small

I am invoking a stored proc from .NET app. The proc returns an out parameter of type Varchar2. To fet ch the out parameter I am passing the parameter to the command as OracleParameter: parm12 = new OracleParameter("testkey" , OracleDbType.Varchar2 , out2 ...

Customize PL/SQL exceptions in Oracle

Frequently I found myself doing some functions to insert/delete/update in one or more tables and I've seen some expected exceptions been taken care of, like no_data_found, dupl_val_on_index, etc. For an insert like this: create or replace FUNCTION "INSERT_PRODUCTS" ( a_supplier_id IN FORNECEDOR.ID_FORNECEDOR%TYPE, a_prodA...

TimesTen - correct way to reinstall schema

Hey, I have TimesTen local store which open cache connect to an Oracle data store. Sometimes I need to drop the whole Oracle schema (Entities changes etc..), so I simply drop every table, and recreate it. The problem I'm facing at this stage is by getting inifite XLA messages (in the TimesTen side) for every entity in every table (I get...

What is the most critical feature PostgreSQL lacks compared with Oracle and DB2 for OLTP?

If you have to use PostgreSQL instead of Oracle or DB2, what feature would you miss the most? I'm specially interested in features which are important for high availability OLTP applications. Thanks! Edit: I'm looking more into technical limitations. Let's assume you have the same level of expertise in PostgreSQL, Oracle and DB2. ...

oracle sample database

Is there are any sample database for Oracle like AdventureWorks for MS SQL? I've searched Oracle site but didn't found any sample database. ...

Oracle Thin Driver and Transparent Failover of RAC DB

I know the oci driver can perform transparent failover of the database, but does the thin driver have the same capability? ...

Hi getting java.sql.SQLException: ORA-04031:

Hi I am getting Following when query executing on through web application java.sql.SQLException: ORA-04031: java.sql.SQLException: ORA-04031: unable to allocate 48784 bytes of shared memory ("shared pool","SELECT emplid levempid, '2...","Typecheck","qry_text : qcpisqt") But same query is executing through TOAD properly. ...

Connecting to Oracle DB through NetBeans

Hi, I'm using NetBeans and I need to connect to Oracle Database. I set up the driver and the connection and it all works fine. I can run queries on this connection just fine (through the IDE). The problem is this- The tables I want to work with are not defined on the same schema that I use for the connection, although, my schema does ...

oracle date sequence?

Hi I have an oracle db and I need a table containing all the dates spanning 2 years; for example from 01/01/2011 to 01/01/2013. First I thought of a sequence but apparently the only supported type is number, so now I am looking for an efficient way to do this cheers hoax ...

Using Oracle Zero Date

I have an application with existing data, that has Zero in the date column. When I look at it from sqlplus I see: 00-DECEMB when I use the dump function on this column, I Get: Typ=12 Len=7: 100,100,0,0,1,1,1 I need to work with the existing data from .Net (no changes to the data,or the data structure or even existing sql statements) ...

SQL: Oracle - Parameters in query

im trying to use the vs2008 query builder to create a query with a parameter. i know that in sql server it would work with: select col1,col2 from tbl where col3=@myParam how would it be typed in oracle or is it pl/sql? i get the problem in the @myParam part. ...

Rebuild InnoDB Index ONLINE to prevent timeouts?

When I update a particularly large table, the update times out because the table is locked while the indexes rebuild. Is there any way to rebuild the index ONLINE (i.e. Oracle) so the update does not timeout? ...

Migrating Oracle Forms to Java

Does anyone know an automated solution to migrate Oracle Forms to Java desktop forms (e.g. a code generator whose input are Oracle Forms definition files and output is Java code in AWT/Swing/SWT/whatever)? Preferrably open-source or free, but commercial ones are also a possibility. ...