Questions tagged as 'pl-sql'

1
answer

Concatenate varchar2 PLSQL

I have 2 tables with relationship 1 to many and I need to concatenate all values of column Nome of table 2 in only one column of select. Eg: In the example, the return of what I need would be Maria, João, José No...
asked by 14.06.2018 / 14:09
1
answer

Select Scalar in PL / SQL - Oracle SQL Developer

I come from a T-SQL (MS SQL Server) background and have things that do not work the same in PL / SQL. I would like to know how to give a select in PL / SQL scalars. Examples in MS SQL Server Example 1: SELECT 1 + 1 Example 2: DEC...
asked by 09.04.2018 / 20:43
1
answer

PLSQL return error when retrieving Bank data

I try to extract data in the database and insert it into a record and then show it in cmd, However when I get a larger number of registration the procedure requires an error message. Code: SET SERVEROUTPUT ON DECLARE TYPE trec IS RECORD...
asked by 10.05.2018 / 23:11
1
answer

Insert record automatically when doing Insert PL / SQL

I'm starting to mess with the PL / SQL database and I'm having a hard time creating a trigger that when inserting a row in the table, put a value in my column whose name is token . I made a code with what I know from DB , but when I ru...
asked by 02.04.2018 / 23:00
1
answer

Error After executing procedure: no output

Code CREATE OR REPLACE PROCEDURE buscaturma(cod NUMBER) AS nomeT varchar2(20); BEGIN IF (cod=0)then dbms_output.put_line('ZERO'); ELSE SELECT DS_TURMA into nomeT FROM TURMA WHERE CD_TURMA = cod; dbms_output....
asked by 23.01.2018 / 15:04
1
answer

How to call another procedure or function within the same packge in oracle?

I have varaias procedures and functions within the same package. How can I reference some inside in my PL-SQL code? PACKAGE : BOX1 PROCEDURE : CLOSE, SOMATOTAL FUNCTION : TOTALNOTES How can I reference SOMATOTAL within CLOSE?    ...
asked by 23.01.2018 / 21:28
1
answer

Selection Using FROM TABLE

I have a table and a function that returns a pipeline, but the function needs to receive a data from the first table, I thought the selection would look something like this: Select FERRAMENTA.IDFERRAMENTAS FROM SIG_SERVICOSFERRAMENTAS FERRAME...
asked by 23.10.2017 / 14:59
1
answer

How to make a change in "Cascade" using oracle

How can I change the ID of my table BANDAS_E_ARTISTAS and ensure that other foreign tables also change via PL / SQL? TABLE BANDAS_E_ARTISTAS ID NOME_ARTISTICO 01 RAÇA NEGRA 02 OS MENUDOS 03 KELLY KEY 04 LUIZ CARLOS --------------------------...
asked by 30.05.2017 / 14:58
1
answer

Loop in pl / sql oracle

I want to know how to go through all the tuples that are stored in a table; how do I do this in PL / SQL Oracle ? Thank you in advance!     
asked by 28.04.2017 / 21:02
1
answer

Filter Last 3 Ratings Oracle sql

I'm making a report and I need to filter out the last 3 vendor evaluations in case this vendor has been downgraded by the date requested in the report. Each evaluation has several questions and I need to bring all these questions to each of t...
asked by 08.02.2016 / 14:41