Questions tagged as 'oracle'

2
answers

How can I optimize an sql query!

Hello good afternoon friends, I hope and are well, I was asked at work to work on this query: SELECT CAST(cd_ITVALCNV AS VARCHAR(6)) AS cd_ITVALCNV, cd_ICTTO, CAST(cd_IEMISORA AS VARCHAR(8)) AS cd_IEMISORA, CAST(cd_ISERIE AS VARCHAR(...
asked by 06.03.2018 / 23:40
1
answer

Referencing two attributes of a table to a primary key of another table

How are you doing? You see, I'm making a logbook for private pilots. Among all the resulting entities (tables), I have two: flight and airport. This Airport table, consists of: ID, ICAO Code, Name and the FK of the city. Among the fields o...
asked by 21.09.2017 / 22:53
1
answer

SQL Queries related tables Oracle [closed]

I do not know how to resolve these two queries: The first query would be like this? there is no other way to put it that lasts 3 months exact, I say it by 30.31s SELECT ID_PRODUCTO FROM PRODUCTOS WHERE ID_PRODUCTO IN ( SELE...
asked by 04.03.2018 / 17:32
1
answer

How can I insert data in a loop until a specified date?

   ORA-01841: the (complete) value of the year should be between -4713 and +9999, and not   must be equal to 0   ORA-06512: online 8 DECLARE LIMITE DATE := '30-01-2018'; CONTADOR NUMBER(2) := 0; ACTUAL DATE := SYSDATE; BEGIN LOOP...
asked by 27.12.2018 / 14:03
2
answers

How to make a query to group by ranges?

I need to group by ranges this is the result where I want to arrive The query I am using is the following: SELECT org_account, COUNT(RESULT) AS TOTAL_MT FROM TABLE WHERE FECHA = '02/12/2018' AND mt_msc_addr IS NOT NULL GROUP BY org...
asked by 03.12.2018 / 16:39
2
answers

How to get un duplicated records using join of 3 tables with different record numbers?

Hello good afternoon friends, I hope and they are well, I have a problem, I need to make a query sql of two tables both have records with one more than another, I made this query: SELECT * FROM ( TVIV056_RELSERIE INNER JOIN TVIV055_INTISE...
asked by 20.04.2018 / 20:13
2
answers

HOW TO RETURN THE FIRST ELEMENT OF A FOR EACH

GOOD AFTERNOON I AM MAKING A SUB-CONSULTATION OF A TABLE IN ORACLE TO BRING THE BENEFICIARIES OF A QUOTE BY MEANS OF A FOREACH I NEED ON THE PART OF THE TABLE TO SHOW ONLY ONE SIDE THE QUOTE, AS IT CAN BE OBSERVED IN THE PICTURE H...
asked by 16.09.2017 / 19:08
1
answer

can you help me generate a TRIGGER in BD ORACLE?

I have many doubts when creating TRIGGERS I have a table called delegations where I have the columns advance 1, advance 2 and advance 3 the only thing that I want that TRIGGER to do is that I register in another table "audit" the user that makes...
asked by 09.02.2017 / 18:18
1
answer

How to carry a consecutive saving in an Oracle BD

I must carry a consecutive document that increases as a document is printed, before I had it in a text document like this: string conse1 = "consecutivo"; string tempurl = "C:\docequi\" + conse1 + ".txt"; LNumDoc.Text = File.Rea...
asked by 16.08.2018 / 21:34
1
answer

Error connecting from .net to Oracle

I am setting up a new WS2012R2 server to host applications; the applications are made in .NET 2.0 and are connected to Oracle 10g. The connections are made through OLEDB. On the new server I have already installed the Oracle client and tns...
asked by 08.09.2016 / 20:22