oracle

Why is Oracle so slow when I pass a java.sql.Timestamp for a DATE column?

I have a table with a DATE column with time (as usual in Oracle since there isn't a TIME type). When I query that column from JDBC, I have two options: Manually convert the values with Oracle's to_date() Use a java.sql.Timestamp Both approaches work and have exclusive areas of hideousness. My problem is when I'm SELECTing data. Here ...

How to move spatial data from Oracle to Postgres

Does anyone have a clear document on how to move Orace Spatial data to Postgres (both Community version and Enterprise DB... Thanks ...

variables in TOAD scripts

I have a SQL script that is being executed in TOAD. Currently I have it laid out with just statement after statement, thusly: select such-and-such from somewhere; delete other-thing from somewhere-else; And so on. Some of the where clauses end up being repetitive because I have complex inner queries to get particular IDs to operate...

Show sum of all for every record

Say you have table of some items with these two columns: ItemName Price ....where ItemName is unique. How do you show sum of all prices for every ItemName (I'm using Oracle)? If I just try this: SELECT ItemName, SUM(Price) FROM Items I get this error: ORA-00937: not a single-group group function ...which goes a...

Sql: Optimizing BETWEEN clause

Hello guys, I wrote a statement that takes almost an hour to run so I am asking help so I can get to do this faster. So here we go: I am making an inner join of two tables : I have many time intervals represented by intervals and i want to get measure datas from measures only within those intervals. intervals: has two columns, one i...

Oracle mapviewer - problem with caching

Hi. I need help with clearing geometry cache. In my web application there is a need to clear cache after changing the geometry data in database. I'm using maps with tile layers and for them i want cache to be cleared using triggers in databae. I've tried with passing request to the servlet mcsadmin (using utl_http in pl/sql) with xml(map...

Are anonymous blocks stored parsed in the SGA?

I have discovered recently that's possible to call anoymous blocks from jdbc like this: String plsql = "BEGIN" + " :result := foobar( booleanparameter => :mypar > 2);" + "END;"; con.prepareCall(plsql); Which is great, because I can use this to "wrap" some function calls and overcome some...

cannot get clob datatype from database into JPA entity

I able to save (spring-hibernate saveorupdate()) field @Lob @Column(name = "FILENAME") private String filename; into oracle database datatype is clob but when i try retrieve it, i get error ERROR - JDBCExceptionReporter.logExceptions(72) | ORA-00932: inconsistent datatypes: expected - got CLOB below is how i retrive ...

Is it a bad practice to use global exceptions in PL/SQL?

Is it a bad practice to do what the code below does? Will bad things happen to me for writing it? Edit: this is just an example. I would not use dbms_output for any real error reporting. CREATE OR REPLACE PACKAGE my_package AS PROCEDURE master; END; / CREATE OR REPLACE PACKAGE BODY my_package AS my_global_interrupt EXCEPTION; PROCE...

Update Oracle table with values from CSV file

Hi, I have a CSV file which contains an ID and several other columns. I also have a table in oracle where the ID identifies a row. How can I best replace the values that are in the table with the values in the CSV file while keeping the other columns the way they were before? This has to be done with tools available in oracle itself (...

coldfusion - oracle guid oddity

Hello all, I am seeing an interesting result trying to use as a sys_guid() value in Coldfusion 7. If I do <cfquery>select sys_guid() as guid from dual</cfquery> The return guid value is seen as a binary field by Coldfusion. However, if I do <cfquery>select sys_guid() || '' as guid from dual</cfquery> The return guid value is se...

Oracle column query or search

We have a large Oracle database with many tables. Is there a way I can query or search to find if there are any tables with certain column names? IE show me all tables that have the columns: id, fname, lname, address Detail I forgot to add: I need to be able to search through different schemas. The one I must use to connect doesn't o...

Could not load file or assembly for Oracle.DataAccess in .NET

Hi: I got 'Could not load file or assembly 'Oracle.DataAccess, Version=2.111.7.20, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. The system cannot find the file specified.' message when I try to run a simple program to access oracle. I checked \windows\assembly and it's in there, but it's not in GAC (gac...

Oracle connection compression?

I have an application that uses JDBC to connect to Oracle 11g. Unfortunately, the machine my app is running on and the Oracle machine are connected via a somewhat low bandwidth connection. I haven't sniffed the connection, but I am pretty sure the data streaming across the connection is not compressed. For my application, I'm more con...

Generate list of classes in order of dependency

Hi all, I'm doing a build script for a Java application to run inside the Oracle JVM. In order to import the 50-odd classes, it appears I need to bring them in in order so any dependencies are present before compilation. For each class, I'm running 'create or replace and compile java source {className} as {classPath}' for each file. D...

select * from table_name where column like '&nbsp'

I need to find records containing html code such as '&nbsp' But when I try to run the select * from table_name where column like '&nbsp%' I got prompt asking for the value of nbsp. I guess the database thinks that nbsp is a parameter. I am wondering if the is an escape character so that I can tell the database that "&" is part of my q...

Convert mysql SQL to oracle SQL

Hi, Is there a Free tool to convert MySql-5.0 SQL to Oracle-10g SQL? thanx in advance,,, ...

How to call an Oracle procedure with Date input from Java-based webservice?

Right now I have an Oracle stored procedure with IN and OUT params. The IN params are simple types and collections (customType as table of customObject). The OUT params are a REFCURSOR and some varchars. The thing is: when I send some data-formatted strings to Date IN params, it throws at me this: java.lang.IllegalArgumentException: Tim...

ORA:00900 Invalid sql statement

i created a procedure with 32 in argument,it sucessfully created.but when i am executing this in back end oracle the errror came ORA:00900 Invalid sql statement ...

How to generate custom classes with ODP .Net 11g

How to generate custom classes with ODP .Net 11g ...