Questions tagged as 'oracle'

5
answers

Error in query with WHERE AND COUNT in Oracle. "SQL command not properly ended"

I have the following query: INSERT INTO TB_CLASSIFICACAO_UG (COD_CLASSIFICACAO_UG, TXT_DESCRICAO, IND_ATIVO) VALUES (SEQ_COD_TB_CLASSIFICACAO_UG.nextval, 'TESTANDO', 1) WHERE (SELECT COUNT(TXT_DESCRICAO) FROM TB_CLASSIFICACAO_U...
asked by 07.02.2014 / 13:44
1
answer

How to call the sendEmail program from Linux from within Oracle

I know that Oracle has a package for this ( UTL_SMTP ), however I would like to use the Linux < strong> sendmail . Does anyone have any code examples or do you know where the Oracle documentation is on this?     
asked by 28.05.2014 / 21:07
3
answers

Join 2 Oracle SELECTS and as a result 2 columns with different values

I'm facing a problem, I have two sql selects select * from web.demonstrativo_processados where nroempresa = 1 and data between to_date('2018/01/01' , 'yyyy/mm/dd') and to_date('2018/12/31' , 'yyyy/mm/dd') That brings me the values of t...
asked by 26.10.2018 / 20:22
2
answers

Doubt with group by - sql

I have these tables: CREATE TABLE empresa ( id_empresa INT, nome_empresa VARCHAR(40), razao_social VARCHAR(40), PRIMARY KEY ( id_empresa ) ); CREATE TABLE departamento ( id_departamento INT, id_empresa...
asked by 03.10.2018 / 20:31
0
answers

Dynamically connect to an Oracle database for each JAX-RS request

I am developing a project in JBoss Seam to provide some services via JAX-RS in Wildfly 9. The DBMS used is Oracle 10g, and the services that will be available are form features that the company develops in Oracle Forms. The procedures, fun...
asked by 23.07.2018 / 14:15
1
answer

List users' phones from a join without duplicating the rows

Good evening, Well, I have the following problem: I need to join in two tables, USER and CONTACT. Each user has more than one contact (Phone), so when I 'm ready the data it returns me "duplicate" lines with different phones because, EX:...
asked by 03.01.2019 / 03:25
1
answer

How do I check if my record in one column (FK) is present in other tables?

I want to delete a record, but sometimes oracle complains: SQL error: ORA-02292: integrity constraint (SGR20_HOMOLOG.TB_CONFIGURACAO_EXERCICIO_T436) violated - child record found 02292. 00000 - "integrity constraint (% s.% S) violated - chil...
asked by 11.03.2014 / 20:36
1
answer

How to pass the schema param param in PLSQL?

I have a function that receives a value in varchar2 with the name of Schema in order to write the data in the database but in the informed schema. create or replace FUNCTION hospitalTeste123(MatriculaMedico in number, nomeSchema in varchar2 )...
asked by 16.05.2018 / 16:07
4
answers

Select first name?

I have a table with the following names: João Goldy Alfredo, Gaby, João Antônio, Rodrigo, Maria Aparecida, Mario How can I get them to get their first names, and those who do not have a last name, should show anyway. What I've tried:...
asked by 27.06.2018 / 01:08
1
answer

How to create a query with a nonexistent table and no error

I have a query that runs on several different schemas in the database, and there is a table that specifies that some schemas have, and if the value exists, it returns. SELECT t.coluna1 ,t.coluna2 ,(SELECT coluna3 FROM tabe...
asked by 09.11.2017 / 20:31