Questions tagged as 'oracle'

1
answer

Doubt in SQL query ORACLE

I'm thinking of doing a View for report development, and I ran into the following problem. I would like to merge the columns PUBLIC1, PUBLIC2, PUBLIC3, PUBLIC4 into a single column. Eg: AM0173 would have 2 lines ID_3_ETAPA | PUBLI...
asked by 06.03.2017 / 14:22
1
answer

Grouping SQL queries

I have these queries below, independent, and I'm having trouble grouping them with the same query result, ie leaving the 6 columns requested by select in the same query. SELECT codigo_processo ,nome_produto_processo ,aprovad...
asked by 30.11.2016 / 17:55
1
answer

What is the difference between Varchar and Varchar2?

I have a question regarding data types in oracle: In Oracle, what is the difference between varchar and varchar2?     
asked by 02.09.2017 / 01:31
1
answer

What is the logic behind the trunc function?

What does trunc do right and what other utilities can this example take?     
asked by 14.12.2017 / 15:23
1
answer

Change sequence value with subselect

I have the following case: I need to change the value of a sequence according to the max (id) of the referring table, I am trying to do something like: ALTER SEQUENCE CFOP_SEQ INCREMENT BY (SELECT MAX(ID)+1 FROM CFOP); But it returns me the...
asked by 30.12.2016 / 11:42
2
answers

Format CPF column with regular expression

In a table containing the CPF column I would like to format it to display the content appropriately. By proper means I mean the format 999.999.999-99 . Is it possible to format this content using regular expression? SQLFiddle for testing...
asked by 27.07.2015 / 19:57
1
answer

Pass text in pl / sql to uppercase

I have many create table, sequence, and etc scripts, however everything is in lowercase, which the colleague did. Deleting line by line and capitalizing is unproductive as there are over 1000 scripts to change. In SQL Server I select and give C...
asked by 23.02.2016 / 13:28
1
answer

How to export data from an Oracle 11 database and import into an Oracle 10?

I'm having trouble exporting data from one Oracle 11 to another Oracle in version 10. I tried copying the exp binary from the old machine to the new but as they are distinct architectures (32/64 bits) it did not work. I read that Da...
asked by 10.03.2014 / 22:40
1
answer

How to convert this date to datetime in oracle?

Correct way to convert date '27/12/2016 16:31:39,137000000' to datetime (timestamp (6)) in oracle? Some frustrated attempts that result in error ORA-01821: formato de data não reconhecido 01821. 00000 - "date format not recognized"...
asked by 12.01.2017 / 17:02
1
answer

Why using a column of a virtual table makes a SQL in Oracle slow

Good. Not wanting to make the subject too "gassy" but just wanted things to investigate in the environment. I have a SQL that uses a virtual table, for a series of reasons that does not come much to the case. Something like: select *...
asked by 18.01.2017 / 01:09