Questions tagged as 'oracle'

2
answers

Add a column with data in Varchar2 format [duplicate]

I want to add the sum of the Value column that is of type Varchar2, I know that to use SUM () I have to use GROUP BY as well, but I can not do the summation. I do not know what fields I have to put in GROUP BY. SELECT DISTINCT z.sales_office...
asked by 26.09.2018 / 14:06
1
answer

Database query error - invalid number

Good afternoon. I am having trouble in a database query. Performing this returns this error: ORA-01722: número inválido 01722. 00000 - "invalid number" *Cause: The specified number was invalid. *Action: Specify a valid number. My cod...
asked by 05.07.2018 / 18:33
1
answer

Exit command in PL / SQL

I have noticed that the command exit works the same as a break, it stops executing the current block and passes to the next one, but which command can stop the whole procedure in PL / SQL?     
asked by 05.08.2018 / 20:11
1
answer

Passing Date parameters for queries

I'm having a problem when passing a parameter. I tried debugging by passing Date to string, but the problem arises that a number is expected instead of a character. After that I researched other ways and tried to pass parameters in the...
asked by 30.08.2018 / 14:19
2
answers

Select to know customers without service in the last 30 days plsql

I have the following columns: CODCLI, CLIENT AND DTULTCOMP I need to know the customers who have not bought in the last 30 days. the DTULTCOMP column is in DATE format Table: PCLIENT     
asked by 28.06.2018 / 16:52
1
answer

Return range of Oracle PL / SQL strings

Good morning! I need to return the value inside a string that is between a range of | in the select below I can get the value from the first | . The expected result is: 83,1 SELECT SUBSTR('1410,00|83,1|39,29|1410m|',...
asked by 19.07.2018 / 13:16
2
answers

How to avoid invalid date error in a subquery

In the code below, the "D" subquery returns only valid dates in the DAY column, however, when you try to filter that column by using the WHERE clause, Oracle displays the following error message:    "ORA-01839: The date is not valid for the s...
asked by 21.06.2018 / 16:52
1
answer

Perform schema import by changing grant and synonym

In an environment I have 5 schemas that make grant and synonym between them, of which they are already working. Now I need to duplicate this default environment for the client environment, and I need to change the name of sch...
asked by 26.06.2018 / 13:58
1
answer

User permission on Oracle tables

Is there a way to know which tables a given Oracle database user is allowed to select?     
asked by 15.05.2018 / 14:52
1
answer

Reset the priority of a record in the table

I need to do an update to reorder records in a table in an Oracle 9 bank. This table stores records that are requests made by users to TI. So, briefly, I have the following fields in the table: PK | NOME DEMANDA | PRIORIDADE ------------------...
asked by 05.04.2018 / 15:35