Questions tagged as 'pl-sql'

3
answers

How to select the year in PLSQL?

I have a table of data for company officials. I have to show who completed a year of work at the company. The data type for the yearAdmission field: DATE (dd / mm / yy)     
asked by 07.02.2018 / 21:28
3
answers

Pick up number after the comma

Working with plsql I am dividing two numbers, and would like to receive only what comes after the comma. Ex: 7.89111. I just need the number 89111.     
asked by 26.10.2015 / 15:35
3
answers

Select the dates below a certain year

How can I create select to show only the employees of a company that have been admitted to it before a given year? The type yearAdmission is date ie: dd-mm-AA     
asked by 07.02.2018 / 20:31
2
answers

Trigger to retrieve Last Record Inserted into table in PL-SQL

I have a trigger that after inserting a new user in the table tFuncionario I have to fill another table tPlanoSaude with the data of the official. Employee table HealthPlantable TriggersCodeCREATEORREPLACETRIGGERINSERTFUNCIONARIOBEFOREINS...
asked by 08.02.2018 / 21:02
1
answer

Column that receives a result if the condition is true

SELECT DISTINCT P.CD_PACIENTE , P.NM_PACIENTE , DECODE (P.TP_SEXO, 'M', 'MASCULINO', 'F', 'FEMININO', 'I', 'INDEFINIDO') SEXO , TRUNC(P.DT_NASCIMENTO) DT_NASCIMENTO , (SELECT FN_IDADE (P.DT_NASCIMENTO,...
asked by 02.05.2018 / 22:00
2
answers

Select to display the column names of a table?

Tables col1| col2| col3| ...| coln 1 | 2 | 3 | ...| n Display the name: col1 col2 col3 ... coln     
asked by 07.03.2018 / 21:00
1
answer

I need explanations of OUT and PL / SQL INOUT and Mysql procedure

Well, I put PL / SQL and mysql because these two modes have procedures in both Oracle and mysql, but anyway. The IN mode I understood that it works like a constant, it is passed through the parameter and can not be changed inside the procedure ....
asked by 10.07.2018 / 21:07
1
answer

PLSQL displays error: PLS-00487: Invalid reference to variabel

I have a PLSQL code: in which I get two values one numeric and another varchar. Code: create or replace FUNCTION hospitalTeste123(MatriculaMedico in number, nomeSchema in varchar2 ) return varchar is type Tmedicos is record( matM...
asked by 14.05.2018 / 21:28
1
answer

In pl-sql can I assign the SUM value to a variable?

In the system you have a% variable of% that should receive the total value of the sum of the Values column. How can I assign the sum value vsoma ?     
asked by 24.01.2018 / 14:10
1
answer

In PL-SQL how to partially sum a value?

I have to add the value partially the values of a category (goes the code in below) DECLARE --VARAVEIS CURSOR CPRODUTO IS SELECT * FROM PRODUTO_TESTE2; VPRODUTO PRODUTO_TESTE2%ROWTYPE; Vsoma real; BEGIN Vsoma := 0; FOR VPRODUTO IN CPRODUTO...
asked by 24.01.2018 / 14:51