I have this trigger:
create or replace trigger t_calctotal
after insert or update on item_fornecimento
REFERENCING NEW AS NEW OLD AS OLD
for each row
begin
if inserting then
dbms_output.put_line(' On Insert');
update fornecimento f set f.total_enc_fornec = f.total_enc_fornec +:NEW.prec_total_if where f.id_fornecimento = :NEW.id...
What is a more elegant way of doing this:
select date from table where id in (
select max(id) from table);
Surely there is a better way...
...
Hi,
I am new to ASP.NET and Oracle. I was looking for a book that will provide step by step guide to develop asp.net applications with oracle database. Could you please let me know about books that I should start with?
Thank you.
...
@Column(name="transpired")
@Lob
private String transpired;
public String getTranspired() {
return transpired;
}
public void setTranspired(String transpired) {
this.transpired = transpired;
}
I tried using the following code in our model class. Transpired is a field with long text messages (reports). When viewing the "report", i...
I have a stored procedure in oracle and want to test it from SQLPlus.
If I use
execute my_stored_proc (-1,2,0.01)
I get this error
PLS-00306: wrong number or types of arguments in call to my_stored_proc
The beginning for the proc is this
create or replace PROCEDURE my_stored_proc
( a IN NUMBER,
b IN NUMBER,
c IN NUMBER,
...
We have a lagacy VB6 app that uses an ODBC connection to a Oracle 10g DB. We are upgrading to a 11g drivers on our SOE and parts of the app have issues. Works fine with a 9.2 driver.
Oracle Client 10g/11g does not like lower-case calls. This is evident in the fact that the calls that succeed are in upper case and the calls that failed a...
Hi there, not sure if the subject entirely conveys what I'm trying to achieve, but let me explain:
We are building an application that uses Oracle as storage backend. Each year, last years dataset will be "Archived", and a new instance created and populated from scratch.
What are the options to do this within the same schema?
Keep ve...
I've got a table which have a column describing a numeric ID, which is unique for all the rows (but it's not the primary key). The numeric ID are limited (let's say for the answer that can be from 1 up to 10)
SELECT ID FROM TABLE;
ID
---
1
2
5
I've got to present to the user (via a UI) the unused values to let choosing a correct...
Hello Guys
Just got a little question
when a column got the Datatype Number(6,3)
will this work?
1234
1234.23
12345
123456
btw google didnt help me :/
...
I have this procedure:
create or replace PROCEDURE CONVERTE
IS
CURSOR oldemployees IS
SELECT *
FROM emp1
WHERE data_saida= NULL;
new_ndep emp1.num_dep%type;
bi_inexistente EXCEPTION;
dep_inexistente EXCEPTION;
employeeNr emp1.num_empregado%type;
BEGIN
FOR old_emp IN oldemployees
LOO...
We have an asp.net application that uses the Oracle client. In the connection string, we specify the 3 basic attributes: data source, User Id, and Password. We are using connection pooling. Our data resides in 2 different Oracle schemas. Most of the requests are for data from Schema1. The timeouts are coming from calls for data from...
Hi,
How can I programmatically get the name of the Oracle database I am connecting to? I tried:
using (OracleConnection connection = new OracleConnection(oraConnectStr))
{
connection.Open();
return connection.Database;
}
but it returns empty string. I can't use the whole connect...
Hi,
How can I get sql inserts from a oracle table with JAVA?
Is there a Oracle API for it?
I need to store it in a file, the result file should have these examples lines:
-- INSERTING into TEST
Insert into "TEST" ("CODE","FAMILY","SUB_FAMILY","SEVERITY","STATUS","ANOMALY_DATE","DESCRIPTION",
"COMMENTS","VALUE0","VALUE1","VALUE2","VALUE...
I'm trying to add a 'not null' constraint to a column in Oracle 9.
ALTER TABLE user_roles modify group_id varchar2(36 char) set not null;
However, the operation fails with an odd error:
Error report:
SQL Error: ORA-12987: cannot combine drop column with other operations
12987. 00000 - "cannot combine drop column with other operation...
Currently we use SQL Server and we have A LOT (read around 5.000) different scripts that create on the fly temporary tables.
Now we are migrating to ORACLE, so we cannot create on the fly temporary tables.
Any ideas?
Thanks in advance
...
I work at a company that uses the Forms based Oracle 11i. A lot of employees complain of the redundancy of data entry and I want to write a program that will ease some of that pain since all attempts to ask IT to do it have failed.
The problem is, since Oracle Forms are Java based there are no "controls" as there would be on say a wi...
I have many cursors that all return rows with the same fields: a numeric ID field and an XMLType field. Every time I access one of these cursors (each cursor has now got its own function for access), I go through the same pattern:
--query behind cursor is designed to no more than one row.
for rec in c_someCursor(in_searchKey => local_se...
Can the update described below be completed in one UPDATE statement?
I want to update the Operators.name_id values with the Users.name_id values by joining on Users.name = Operators.op_name. Both Users.name and Operators.op_name are have a unique.
I know the situation described below doesn't follow "best practices", but it's a much si...
The following code is generating this
Warning: oci_execute() [function.oci-execute]:
ORA-00911: invalid character in F:\wamp\www\SEarch Engine\done.php on line 17
the code is...
<?php
include_once('config.php');
$db = oci_new_connect(ORAUSER,ORAPASS,"localhost/XE");
$url_name=$_POST['textfield'];
$keyword_name=$_POST['textarea'];...
Does anyone know how to get around this error ? this sql works fine, but for the 'cumulinvoiced' partitioning function. i'm trying to add a cumulative total, but it doesn't seem to work on inline views.
SELECT a.mois, a.supid, a.status, COUNT (a.status),
SUM (COUNT (a.status) OVER (ORDER BY a.status, a.supid, a.dossier, a.mois)...