Questions tagged as 'oracle'

1
answer

SQL (ORACLE) How can I insert the current date into a table when inserting a record?

I know it's a Trigger and I have this, but it generates an error: create or replace trigger INSERTAR_HORA AFTER insert on TAREA_SOPORTE for each row begin UPDATE TAREA_SOPORTE SET HORA_GENERADO= CURRENT_TIMESTAMP...
asked by 04.10.2017 / 08:19
1
answer

Between with null fields

Good day I have a table where I have to make a query between two columns of type date, the problem is that the end date column can have null data, is there any way to perform the query ??? Here my query SELECT ACC INTO OUT_M1_PRIMNIV...
asked by 09.11.2017 / 18:46
1
answer

trigger and mutant table

I am having problems updating the rows of a table due to a necessary trigger that I have. The error is that of the mutant tables and I do not know how to modify my trigger so that it does not happen. The structure of the table is as follows:...
asked by 05.08.2017 / 03:24
1
answer

Constraint null and dni

I need a constraint that allows only the values NULL or a valid DNI (from Spain) to be inserted. I do not know how to add the one that is also worth the null value, I leave my constraint to see if they can finish it. Thanks. ALTER T...
asked by 04.08.2017 / 23:59
1
answer

Trigger hours every 30 m in oracle

I'm new to sql and I do not know how to address this problem. I have a table that stores citations with a atributo hora of type varchar2 . I need a trigger that avoid the insertion and update of hours that are not in the...
asked by 01.08.2017 / 19:32
1
answer

Concatenate columns in oracle

Good morning. I have a problem when concatenating columns in oracle and I do not know what to do. This would be a simplified query of what I do: select t1.c1 || '##' || t1.c2 || '##' || t2.c3 from t1, t2 order by t1.c1 asc, t1.c2 asc, t2.c3...
asked by 12.09.2017 / 10:24
1
answer

How to alter a field in oracle to save only the time

I have the following table created in oracle but when I created the time I put it as a date type and I want to change it to a data type that only saves the time in the field VUE_HORA_SALIDA     
asked by 30.07.2017 / 06:26
1
answer

How to get the number of the day of the week PL SQL ORACLE regardless of language

The idea is to be able to get the number of the week in a function in ORACLE but that it will always return the same values regardless of the language configuration so as not to give wrong calculations in the dates, for example Spanish: L...
asked by 02.06.2017 / 17:27
2
answers

Return a data from a stored procedure in Oracle

I have this stored procedure: create or replace procedure spu_modificarTrabajador ( tnombre varchar2, tapellido varchar2, tid_cargo number, tdireccion varchar2, trut varchar2,tsueldo number, tcorreo varchar2, tcomuna number) is begin updat...
asked by 02.07.2017 / 08:52
1
answer

Initialize a Lazy list in hibernate using a criterion with a parameterized SetAlias

I have the following code: criterio = session.createCriteria(Tecnico.class) .add(Restrictions.eq("expediente", usuario)) .add(Restrictions.eq("password", contrasenia)) .createAlias("empresa", "empresa", JoinType.LEFT_OUTER_JOIN) .setF...
asked by 10.03.2017 / 16:42