oracle

Will Pro*C work with MSVC 6?

How do you get Pro*c to work within MSVC 6? In otherwords compile a .pc file into a .cpp file. ...

Importing extended ASCII into Oracle

I have a procedure that imports a binary file containing some strings. The strings can contain extended ASCII, e.g. CHR(224), 'à'. The procedure is taking a RAW and converting the BCD bytes into characters in a string one by one. The problem is that the extended ASCII characters are getting lost. I suspect this is due to their values me...

Best Oracle database manager/editor?

We have an Oracle 8i database that our developers run against and we currently use the 9i enterprise manager to view tables/values and do some minor manual data editing. I was wondering if there is a more modern tool to use than OEM 9. One major annoyance with OEM is the lack of mousewheel support. To keep this question objective, I ...

How can I insert multiple rows into oracle with a sequence value?

I know that I can insert multiple rows using a single statement, if I use the syntax in this answer. However, one of the values I am inserting is taken from a sequence, i.e. insert into TABLE_NAME (COL1,COL2) select MY_SEQ.nextval,'some value' from dual union all select MY_SEQ.nextval,'another value' from dual ; If I try to run it,...

What is the best way to precompile JSPs using ANT

I am trying to figure out the best way to use ANT to precompile JSPs that will be deployed to an Oracle application server. Even though I am deploying to an Oracle app server I would like to avoid using Oracle's version of ANT. ...

Grid Control gets slower over time

We use Grid Control 10.2.0.4, with a catalog repository database also at 10.2.0.4. It seems that after a week or two of being up, the response time of the web interface gets very poor (20+ seconds to navigate to a new page, when normally 2-3 seconds is seen). The only thing we've found to overcome it is a restart of the catalog database ...

Using a subquery instead of a table name in an Oracle Update Statement

I need write an update statement that used multiple tables to determine which rows to update, since in Oracle, multiple tables aren't allowed. The following query will return a "ORA-00971: Missing SET keyword" error UPDATE TABLE1 a, TABLE2 b SET a.COL1 = 'VALUE' WHERE a.FK = b.PK AND b.COL2 IN ('SET OF VALUES') Looking up t...

How to read the PL/SQL code in an Oracle Forms .FMT file ?

Oracle Forms10g provides a tool to convert the Oracle Forms modules, from the binary format (.FMB) that Oracle Forms Builder works with, to text format (.FMT). For example, if you create a module called mymodule.fmb with Oracle Forms Builder, and then invoke frmcmp module=mymodule.fmb script=yes batch=yes logon=no from the command li...

What is the difference between "AS" and "IS" in an Oracle stored procedure?

I see Oracle procedures sometimes written with "AS", and sometimes with "IS" keyword. CREATE OR REPLACE Procedure TESTUSER.KILLINSTANCE (INSTANCEID integer) **AS** ... vs. CREATE OR REPLACE Procedure TESTUSER.KILLINSTANCE (INSTANCEID integer) **IS** ... Is there any difference between the two? Edit: Apparently, there is no funct...

What would be the most convenient way to connect Visual Studio 2005 (C#) to Oracle8?

I'm looking for best practices for establishing connections between Oracle 8 and Visual Studio 2005 applications. The target would be a Windows Forms application written in C# that hits the database once a second to monitor tables looking for their last inserted record. I'm considering using "Application settings" to store the connection...

Will Oracle retire 10gAS in favor of WebLogic?

Oracle purchased BEA and their WebLogic suite of tools. They still have a competing product in their own 10gAS Application Server. Both are J2EE, enterprise grade, servers. While it make take some time due to maintenance agreements, it would be unusual for them to continue to produce two products within the same architectural space. ...

How to specify default file extension for Oracle's Pro*COBOL precompiler

Is it possible to configure the default file extension that Oracle's Pro*COBOL precompiler assumes for EXEC SQL INCLUDE filename END-EXEC statements in which there is no filename specified for the include file? The docs seem specify that in this case - INCLUDE statement without file extension - the precompiler will use the system de...

How do you add weights together in an oracle text index?

I have created a multi column datastore on a table that allows me to do full text indexing on the table. What I need to be able to do is weight each column different and add the scores together. The following query works, but is slow: SELECT document.*, Score(1) + 2*Score(2) as Score FROM document WHERE (CONTAINS(documentContent, 'the_...

How can I create a copy of an Oracle table without copying the data?

I know the statement: create table xyz_new as select * from xyz; Which copies the structure and the data, but what if I just want the structure? ...

Conversion tool for MS-Excel spreadsheets with macros and VB to Oracle?

Our users have created MS-Excel spreadsheets which over time have evolved into fairly complex applications. They run their part of the business with them. But, never having been exposed to software development discipline, these spreadsheets are brittle, single point of failure, solutions. Our development group uses Oracle primarily wi...

SQL - Multiple Values comma separated when using GROUP BY

I have data that looks like CUSTOMER, CUSTOMER_ID, PRODUCT ABC INC 1 XYX ABC INC 1 ZZZ DEF CO 2 XYX DEF CO 2 ZZZ DEF CO 2 WWW GHI LLC 3 ZYX I'd like to write a query that'd make the data look like this: CUSTOMER, CUSTOMER_ID, PRODUCTS ABC INC ...

VC++ problem with 64 bit oracle client with OpenforwardOnly flag in database connection.

Hi, I am porting an existing windows based C++ application to 64 bit environment and this is one of those weird errors. In the code snippet you can that I am using openforwardonly and it used to work fine with our old setup but in the 64 bit environment it gives the problem of fetching only ONE recordset. Or it could be a problem with th...

How to use Explain Plan to optimize queries?

I have been tasked to optimize some sql queries at work. Everything I have found points to using Explain Plan to identify problem areas. The problem I can not find out exactly what explain plan is telling me. You get Cost, Cardinality, and bytes. What do this indicate, and how should I be using this as a guide. Are low numbers better? ...

Binding ASP.NET GridView to an Oracle SYS_REFCURSOR

We have a Procedure in Oracle with a SYS_REFCURSOR output parameter that returns the data we want to bind to an ASP.NET GridView control. I've seen this done before but I can't find the original reference I used to solve the problem. Here is what the procedure looks like: create or replace PROCEDURE GETSOMEDATA ( P_Data OUT SYS_REF...

Oracle: how to UPSERT (update or insert into a table?)

The UPSERT operation either updates or inserts a row in a table, depending if the table already has a row that matches the data: if table t has a row exists that has key X: update t set mystuff... where mykey=X else insert into t mystuff... Since Oracle doesn't have a specific UPSERT statement, what's the best way to do this? ...