oracle10g

Oracle Spatial - select objects falling within area

…衆ロ難τιáo~ 提交于 2019-12-11 07:44:31
问题 this is probably simple to those who know (I hope!) I have an Oracle spatial database with a geometry column containing a list of node points, in northing/easting format (if it's relevent!) I need to select those objects which fall within a given radius of a given point. Northings and Eastings are 1 meter apart which makes it a bit easier. Ideally this should include objects which cross the area even if their node points fall outside it. Is this an easy-ish query? Maybe using SDO_WITHIN

Add auto increment and auto decrement column in oracle 10g

让人想犯罪 __ 提交于 2019-12-11 07:40:07
问题 I would like to add a column to oracle database which increment automatically after inserting a record.And it should be decrement automatically when deleting a record.This field is used for store a sequence number of a table headings and that headings should be able to re-order therefore there shouldn't have any gaps between number sequence.I have tried with TRIGGER and SEQUENCE but it didn't work.Are there any way to use PL/SQL to this.Actually what I want is to shift the sequence numbers

internal error(00801) on combining two collections in oracle 10g

不想你离开。 提交于 2019-12-11 07:29:25
问题 hos := hos1 multiset union hos2; The statement throws internal error, where hos, hos1 and hos2 are of same object type 回答1: This error seems to have been fixed on Oracle 11. For previous versions, you need to add a map member function. alter type my_object_type add map member function dummy return number invalidate; 来源: https://stackoverflow.com/questions/35934650/internal-error00801-on-combining-two-collections-in-oracle-10g

Compare two records and show only the difference

梦想的初衷 提交于 2019-12-11 06:26:14
问题 I'd like a Oracle Pipelined Function which compares two records from a query result and shows only the column which have changed between the query result? 回答1: Its not quite what you want, but Kevin Meade's blog on OracleFAQ has a solution which works for me: http://www.orafaq.com/node/1826 http://www.orafaq.com/files/column_diffs.txt 回答2: Here is a blunt instrument approach to the problem. create or replace function col_diff ( p_empno_1 in emp.empno%type , p_empno_2 in emp.empno%type )

Oracle sequence for a primary key field doesn't retrieve the currently inserted value in Hibernate

余生颓废 提交于 2019-12-11 06:24:18
问题 I have the following code that attempts to fetch a generated sequence value for the primary key column COUNTRY_ID of the COUNTRY table in my Oracle (10g) database. Country c=new Country(); c.setCountryName(request.getParameter("txtCountryName")); c.setCountryCode(request.getParameter("txtCountryCode")); Zone z=(Zone) session.get(Zone.class, new BigDecimal(request.getParameter("zoneId"))); c.setZone(z); session.save(c); session.flush(); //session.refresh(c); System.out.println(c.getCountryId()

Xml bulk insert in oracle table

故事扮演 提交于 2019-12-11 06:19:41
问题 Im new to oracle, what im trying is, I have an xml, i try to insert the same in a oracle database table, i have formed a query, when i try to insert it. i get some Error like Error report - ORA-06550: line 35, column 84: PL/SQL: ORA-00933: SQL command not properly ended ORA-06550: line 5, column 2: PL/SQL: SQL Statement ignored 06550. 00000 - "line %s, column %s:\n%s" *Cause: Usually a PL/SQL compilation error. *Action: i couldnt able to figure out what i missed, Suggest me how to change the

Reason for geting ORA-01422: exact fetch returns more than requested number of rows

折月煮酒 提交于 2019-12-11 06:09:18
问题 So i am working on an installer where the installer connects to a database and creates tables and populates them. Every aspect of this works correctly except when i attempt to add rows to a certian table. declare retVal INTEGER; rptID INTEGER; catID INTEGER; wsID INTEGER; paramID INTEGER; dtID INTEGER; begin select PK into catID from RPT_CATEGORY where KEYVALUE = 'ProductivityReportsCategory'; select PK into rptID from RPT_REPORT where KEYVALUE = 'ProductivitySummaryReport2'; select PK into

How to identify the current row in an Apex Tabular Form?

て烟熏妆下的殇ゞ 提交于 2019-12-11 06:08:58
问题 Friends, I have written the following JavaScript to ascertain which row of an tabular form the user is currently on. i.e. they have clicked a select list on row 4. I need the row number to then get the correct value of a field on this same row which I can then perform some further processing on. What this JavaScript does is get the id of the triggering item, e.g. f02_0004 This tells me that the select list in column 2 of row 4 has been selected. So my Javascript gets just the row information

How to write triggers to enforce business rules?

冷暖自知 提交于 2019-12-11 05:39:40
问题 I want to create triggers for practicing PL/SQL and I sorta got stuck with these two ones, which I'm sure they're simple, but I can't get a hold of this code. The first trigger forbids an employee to have a salary higher than the 80% of their boss (The code is incomplete because I don't know how to continue): CREATE OR REPLACE TRIGGER MAX_SALARY BEFORE INSERT ON EMP FOR EACH ROW P.BOSS EMP.JOB%TYPE := 'BOSS' P.SALARY EMP.SAL%TYPE BEGIN SELECT SAL FROM EMP WHERE JOB != P.BOSS ... And the

OC4J 10.1.3.3 unable to find ojms.rar setting up database persistences

余生颓废 提交于 2019-12-11 05:31:23
问题 I'm running into problems with JMS in Oracle AS 10.1.3.3. The error I am getting is 'connectors\ojms.rar (The system cannot find the path specified)' from EM. Below are a few bullets on the environment. This is on a Windows XP SP3 machine. All configuration is through EM. The EM is a local instance that has been used for over a year. This instance has existing db connection management exposed through JNDI. Oracle_home is set to the directory where I unzip the OC4J zip file. c:\oc4j_10.1.3.3.