Questions tagged as 'oracle'

1
answer

Procedure to give permissions to an Oracle 11g user?

I am trying to create a procedure that receives as a parameter the user to whom they wish to grant the tables permission directly, I know that it would be better with a role and simply grant it, but it is an exercise, to create a procedure that...
asked by 04.04.2017 / 03:58
1
answer

How to make an autoincrementable field in oracle 11g?

The table is as follows. create table ventas( id_venta number(5) primary key, id_articulo number(5) references articulos, id_empleado number(6) references empleado, id_cliente number(5) references cliente, cantidad numbe...
asked by 30.12.2017 / 00:36
2
answers

SELECT SCOPE_IDENTITY () in Oracle

This PROCEDURE is done in the MSSQL database engine and I need to pass it to ORACLE 11g: CREATE PROCEDURE [dbo].[Insert_User] @Username NVARCHAR(20), @Password NVARCHAR(20), @Email NVARCHAR(30) AS BEGIN SET NOCOUNT ON; IF EXISTS...
asked by 14.11.2018 / 16:14
3
answers

How can I subtract two dates and give me back hours minutes and seconds Oracle

For example if rest 01/01/2017 19:30:00 - 01/01/2017 22:30:30 , in the output should appear 3 horas y 30 segundos This is what I have tried but it does not return it with the format I want, it returns the values of the date separ...
asked by 26.04.2017 / 13:43
2
answers

SQL Contains: Escaping query operators

I had a query running for some time (mounted by JPA) when suddenly I was given an exception:    org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.orm.hibernate3.HibernateJd...
asked by 15.09.2016 / 12:17
1
answer

How do I calculate the variance of an age group in sql?

Hi guys, I hope you can help me, I have tried to get the variance of a "users" table. The field "Age" is not as such, I calculate the age of each user in the following way: select trunc(months_between(sysdate,FechaNac)/12) edad from usuarios...
asked by 11.10.2016 / 06:33
1
answer

Compare Data in Oracle

As the title says, I need to make a data comparison. The situation arises in the following way. I have a function that receives a parameter that parameter will be processed to remove certain characters from it. The function is as follows: C...
asked by 07.12.2018 / 22:07
1
answer

Hide my OLEDB connectionstring in Excel

I need to hide the password or the entire connection string to outsiders who use a certain template in Excel 2010. To create the connection, I follow the following steps in Excel: "Data" tab Option - "From other sources" Option - "Fro...
asked by 28.02.2017 / 22:06
2
answers

Replace PL / SQL character

I need to replace a particular character of one in oracle. For example: cadena= '12121113' and what I need is to change the "1" to a "2" but only the "1" that is in the 3 position. and return the modified result. As a result, there...
asked by 08.03.2016 / 22:06
1
answer

How to recover the last id generated in oracle 11g

I'm trying to capture the last id registered in a table (USE ORACLE 11G) and searching the internet I found this post . I did not find much information in Spanish that's why I'm only using this post as a reference, but it does not wor...
asked by 29.06.2018 / 20:20