Questions tagged as 'oracle'

1
answer

How to enter time in Oracle?

I need to save only hour and minutes (seconds do not make a difference, so have or do not), should I use TIME or TIMESTAMP ? I started to do with TIMESTAMP(6) , but I'm having a hard time doing insert , what should I...
asked by 19.07.2017 / 17:33
2
answers

Remove Oracle Special Characters

Good morning, I have a query here made in Oracle where in one of the records is bringing a string starting with quotation marks, does it have any oracle function to remove only the quotation marks at the beginning and end of a string? Than...
asked by 09.11.2017 / 12:32
1
answer

Oracle procedure return query rows

I have the following table: CREATE TABLE CARRO ( CD_CARRO INT ,DONO VARCHAR(20) ,MARCA VARCHAR2(20) ); The inserts INSERT INTO CARRO VALUES (1,'VICENTE','FERRARI'); INSERT INTO CARRO VALUES (2,'CARLOS','FUSCA'); INSERT I...
asked by 29.03.2017 / 15:26
1
answer

Query not working, problem comparing years

Hello, I'm trying to compile a query to perform an insert, as it uses only database data I'm a select for this. My problem is in the where clause where either end of operation has to be null or the year of the end of operation has to be shorter...
asked by 12.01.2017 / 20:17
1
answer

On the tables and Sequences that "comes" with Oracle

I had a question about the need to keep the tables coming "ready" in oracle . When you create any connection, when looking at the tables you can see several tables and sequences , what do these tables usually serve? Is there a proble...
asked by 19.05.2017 / 22:34
1
answer

TNS-03505 - ORACLE tnsping

When attempting to ping, using tnsping . ex: tnsping UMEXEMPLO I get the following error    TNS-03505: Failed to resolve name Which solution usually applies? EDIT: From other machines we normally access the Ba...
asked by 09.05.2017 / 16:41
1
answer

Truncate tables with cascade

I have a table hotel and table reservation. In the reservation table I have the primary key of the hotel table as the foreign key. I can not truncate because there are relationships between braces. How can I do it? I already did: trun...
asked by 26.11.2016 / 20:01
1
answer

SQL query using several times the same function

I have a function that converts the ID of a version to number, for example, from 1.0.0 to 10000 , so I can filter the results. Function: CREATE OR REPLACE FUNCTION f_convert_tag_to_number(ptag varchar2(12)) RETURN NUMBER IS...
asked by 23.11.2016 / 20:06
2
answers

Calculation for year "turn" with trigger

How to treat the trigger below so that operations performed between 11/21/2016 and 12/20/2016 return date 01/20/2017 instead of 01/20/2016. p> DECLARE P_COUNT NUMBER(5); DIA_VENDA VARCHAR(2); MES_VENDA VARCHAR(2); MES_...
asked by 10.11.2016 / 18:52
2
answers

Query product mix oracle

I made an indicator here in the company where you ready product information, quantity sold, average value, etc. This in a period of time. Now I need the following information: What is the product that most often appeared in the same sales...
asked by 19.05.2016 / 18:31