Questions tagged as 'oracle'

1
answer

Problem with Oracle OJDBC6

I have a Maven Module project of Liferay 7, which I want to implement a connection to Oracle through the OJDBC6, I have my connection which is the following: public static Connection getConnection() { if (connection != null) { retu...
asked by 29.03.2017 / 22:25
1
answer

Store procedure oracle with several queries at the same time

Hi, I want to run 2 queries on 2 different tables with a single store procedure. BEGIN UPDATE personal SET imei_equipo = v_imei WHERE PERSONAL_ID = v_personal_id; BEGIN UPDATE lugar SET latitud = v_latit...
asked by 03.02.2017 / 21:09
1
answer

Doubt about PL / SQL function

I wanted to know how to create a function that inserts data into a table. What value should I return ( return )? With a procedure I do it correctly, but when it comes to doing it with a function, I do not understand what value I should ret...
asked by 18.04.2017 / 19:56
2
answers

Error executing Cursor

When I execute the next SQL block, it tells me that I must declare the variable p_name, but I have declared it before. declare p_nombre varchar2(200) ; BEGIN FOR REG IN (select c1000 INTO p_nombre from edyficar.cl_clientes2...
asked by 17.04.2017 / 07:39
1
answer

Problems in collecting data by select

I have a problem making a simple selection of a date. I commented: I want to collect the month of the creation of a file and that is ordered by the date with this sentence: select to_char(fecha,'MONTH') as MES from archivos order by (fecha...
asked by 26.01.2017 / 10:46
1
answer

Left Join in Oracle query

Good morning! I have the following query: SELECT * FROM (SELECT CLIENTE.CTE, CLIENTE.NO_EMPLEADO, CLIENTE.CTE_N, CLIENTE.NOMBRE, CLIENTE.AP_PATERNO, CLIENTE.AP_MATERN...
asked by 03.05.2017 / 16:14
2
answers

PL / SQL: convert varchar to time to get difference later

I have saved in a table a varchar that represents a time, for example '23: 30 '. What I want to do is convert that value to time and then calculate the difference with respect to sysdate ... Will there be any way to do it? I con...
asked by 25.11.2016 / 05:59
1
answer

Problem with SQL query in Oracle [closed]

I have a system which performs the query of a product in a store. That is, in my interface I select todas and then I enter the product code and I should throw all the stores with that product available. The query I modified it for that pu...
asked by 14.11.2016 / 17:21
4
answers

What is the best way to make a current contract selection and an employee's previous contract in the same row?

Hi, I'm scheduling queries in Oracle 11g and PostgreSQL 9.4, and I have been asked to perform a query whose output is shown in the following image. Employee_ID belongs to the employee table; Current_Contract_ID and Previous_Contract_Id...
asked by 08.11.2016 / 18:21
1
answer

SQL query to see user with more confirmed friend requests

In a database exercise I get a DB with which I must take 2 tables TBL_AMIGOS and TBL_ESTATUS_SOLICITUDES to make a query to know the user with the largest number of confirmed requests. I've tried with HAVING and COUNT...
asked by 16.10.2016 / 09:13