oracle10g

How to call a procedure with associative arrays in Oracle from Java

混江龙づ霸主 提交于 2019-12-02 10:54:40
问题 I have an stored procedure that looks like this: TYPE ref_cursor IS REF CURSOR; TYPE parametro IS RECORD ( nombre VARCHAR2(50), -- I want to remove this value and make it the key of the table instead. valor VARCHAR2(32000), tipo VARCHAR2(1), sentencia VARCHAR2(32000) ); TYPE parametros IS TABLE OF parametro INDEX BY VARCHAR2(50); PROCEDURE build_cursor ( params IN parametros results OUT ref_cursor ); And from the build_cursor procedure, I want to be able to access to the contents of the table

How to check conditions and write text into text file oracle forms

北城以北 提交于 2019-12-02 10:34:58
I am creating Procedure in Oracle Forms in which Check Validation data and insert data into table. Also check Validation data If condition true then write Some texts into text file and If condition is not true then write some texts into text file. Like: Validation No.1 : OK Validation No.2 : OK I created procedure successfully for "TRUE" Condition. Now I want If One Condition is True and 2nd Condition is False then write texts into text file. Like: Validation No.1 : OK Validation No.2 : ERROR And If both conditions "FALSE" Then Validation No.1 : ERROR Validation No.2 : ERROR Code: PROCEDURE

Error on ORACLE trigger

∥☆過路亽.° 提交于 2019-12-02 10:31:22
I have this sexy trigger, that takes a value from a field REFERENT, parses it, finds a row in some view and fills some data to original row that needs to be inserted. I also then re-write the REFERENT field and eliminate the extra data. The REFERENT field looks like this: "-XXX-123", where 123 is the key that i search data in the view. Hope it makes sense. CREATE OR REPLACE TRIGGER TRI_UPDATE BEFORE INSERT ON TBLASCENTOUTPUT_X REFERENCING NEW AS NEW OLD AS OLD FOR EACH ROW WHEN ( new.STEVILKA_NAROCILA is NULL ) DECLARE PARSED_STNAROC VARCHAR(255); PARSED_PRIMARY_VALUE VARCHAR(255); BEGIN

Deleting duplicates rows from oracle

两盒软妹~` 提交于 2019-12-02 09:43:41
问题 I am using oracle database.I want to use duplicate rows from a table except one,which means that I want to delete all rows but atleast one row should be there. I have a table employee_id ---- department_id 1 10 2 10 1 20 3 30 2 30 Now i want to delete duplicate rows but at least one row should be there. select count(employee_id),employee_id from employee group by employee_id having count(employee_id) >1)); i had used this to find number of employees that are in more than one department but

How Can I Make Oracle Query Sort Order Dynamic?

最后都变了- 提交于 2019-12-02 09:21:58
问题 I have a Oracle procedure inside a package like this PROCEDURE getEmployee ( pinLanguage IN VARCHAR2, pinPage IN NUMBER, pinPageSize IN NUMBER, pinSortColumn IN VARCHAR2, pinSortOrder IN VARCHAR2, poutEmployeeCursor OUT SYS_REFCURSOR ) AS BEGIN OPEN poutEmployeeCursor FOR SELECT * FROM ( SELECT EMPLOYEE_ID, USERNAME, FULL_NAME, DATE_OF_BIRTH, EMP.GENDER_ID, GEN_TR.GENDER, EMP.WORK_TYPE_ID, WT_TR.WORK_TYPE, SALARY, EMAIL, PROFILE_IMAGE, ROW_NUMBER() OVER (ORDER BY EMPLOYEE_ID ASC) RN FROM

Creating Multiple table in Oracle

大城市里の小女人 提交于 2019-12-02 09:14:26
问题 I am using Oracle Express 10g and I'm enter the following text to create 2 tables in the sql command line, but it is not working. CREATE TABLE student ( matric_no VARCHAR2(8), first_name VARCHAR2(20), last_name VARCHAR2(20), date_of_birth DATE ); CREATE TABLE student1 ( matric_no VARCHAR2(8), first_name VARCHAR2(20), last_name VARCHAR2(20), date_of_birth DATE ); Can anyone see what I am doing wrong. Thanks 回答1: By "command line" you probably mean the web application that comes with Oracle

Cannot Deploy MVC 3 Project with Entity Framework 4.3.1 and Oracle ODAC

非 Y 不嫁゛ 提交于 2019-12-02 09:04:47
问题 I'm currently trying to deploy a MVC 3 application I've been working on to our test web server, and am running into a major problem with loading everything correctly. To try and give as much info about this as possible, I'm doing a bin deploy (I've sent all references to copy locally), and am doing a basic Publish on the web project via file system to the application directory on the server. The components I'm using are: Entity Framework 4.3.1 Oracle ODAC 11.2.0 (version 4.112.3.0) This

How do you write arrays to an Oracle 10g XE db using iBatis?

强颜欢笑 提交于 2019-12-02 08:40:10
I have looked for the answer to this high and low but cannot get the answer. Basically I have an object I am writing to my db using iBatis. This works fine with primitive types like strings, int's etc but one of the attributes of my object is an array of other objects. I would like to be able to persist this and then later call the 'selectById' statement and retrieve the full object including the array. Here is the code I have so far: Mapper.xml <insert id="insertTrade" parameterClass="TradeObject"> insert into TESTTABLE ( ORDERID, MAXPX, COMMISSION, ACCOUNTGRP ) values ( #orderID#, #maxPx#,

Blank character ignored in where clause

若如初见. 提交于 2019-12-02 08:30:39
问题 I have done the following - create table test (col char(10)); insert into test values ('hello'); select * from test where col = 'hello' I have been suggested that the above should not return any result as 'col' is 10 chars, it will be right padded with blanks, so comparing with 'hello' will not return result. But I am getting the result. Can anyone please explain this? I am using 11gR2 回答1: Looking at the Oracle Documentation on literals: Text literals have properties of both the CHAR and

Name already used by an existing object in VBA

本秂侑毒 提交于 2019-12-02 08:12:26
In VBA, I am trying to use OraDynaSet object to create a temporary table and fetch some data into it before using it for another select. strSQL = "create table user1.new12 as(" _ & "Select lca.coupon_upc,lca.division from lca where lca.campaign_id = " & campaign_id & "" _ & "MINUS " _ & " Select mcr.coupon_upc,mcr.division from mcr where mcr.campaign_id = " & campaign_id & ")" Set OraDynaSet = objdatabase.DBCreateDynaset(strSQL, o&) I have opened up the connection with the user user1 to perform a number of select queries before executing this DDL. Now, when I execute the VBA code, it throws an