Questions tagged as 'pl-sql'

1
answer

Variable without value pl / sql

I tried to run this pl / sql but it did not work declare v teste%rowtype; begin v.ra; select ra into v.ra from teste where nome = 'Danilo'; dbms_output.put_line(v.ra); end; After a long time I decided to assign a value to it and then change...
asked by 06.05.2018 / 00:00
1
answer

How to give select in XML and return a specific column from an anonymous block?

I have an anonymous PL / SQL block that returns an XML to me as the result of running a web service. How do I give a select in this XML to get only one column I want?    Anonymous block: DECLARE l_filename varchar2(255); l_BLOB BLOB; l_CLO...
asked by 07.05.2018 / 20:18
1
answer

Error executing oracle procedure

I have this procedure: CREATE OR REPLACE PROCEDURE buscaturma(cod in INTEGER) AS nomeT varchar2(20); BEGIN dbms_output.put_line('inicio'); IF (cod=0)then dbms_output.put_line('ZERO'); ELSE SELECT DS_TURMA into nomeT...
asked by 23.01.2018 / 14:30
1
answer

How to resolve error ORA-01795 (maximum number of expressions) in Codeigniter

I am developing a report in Codeigniter, however my select contains a filter that can have more than 1000 expressions in my where_in and then it returns me the error: ORA-01795: o número máximo de expressões em uma lista é de 1000. I...
asked by 25.10.2017 / 12:09
2
answers

SELECT that brings active products in one company and that are not active in all other

I have a table that shows the products that are Active (A) or Inactive (I) in 16 branches. That is, there are 16 rows for each product. I want to select all products that are Active (A) in company 16 and at the same time must be Inactive (I)...
asked by 19.04.2017 / 17:01
1
answer

Difficulty in assigning valorer in plsql

In a college exercise the following was requested:    In a presidential election there are three candidates. Votes are   informed by code. The data used for scrutiny   following codification: 1, 2, 3 = votes for the respective   candidates; 4...
asked by 16.04.2017 / 22:53
1
answer

PL / SQL - Incorrect number of argument types in the call

I'm having a problem with a simple function that I created. create or replace FUNCTION dry_login ( username IN VARCHAR2, password IN VARCHAR2 ) RETURN BOOLEAN IS l_user varchar2(70); l_pwd varchar2(70); BEGIN SELECT usuario_...
asked by 26.05.2017 / 16:29
2
answers

How to do for loop in SQL SERVER?

BEGIN <<LOOP_EXTERNO>> FOR V_EXTERNO IN 1..20 LOOP DBMS_OUTPUT.PUT_LINE('Contador externo: ' || V_EXTERNO); <<LOOP_INTERNO>> FOR V_INTERNO IN 1..5 LOOP DBMS_OUTPUT.PUT_LINE('Contador interno: ' || V_INTERNO);...
asked by 26.10.2016 / 15:00
1
answer

Trigger prevents table change

I need to make a trigger that will prevent the same employee from joining more than one crew on the same day. The crew table is as follows: Tripulação = {id_Voo, data, id_Funcionário } The 3 attributes are together the primary key. Wh...
asked by 21.01.2016 / 13:07
1
answer

Case and Group by Error - Oracle SQL Developer

Hello, I'm trying to group the results of a query with case as follows: select case when sal BETWEEN 0 and 100000 then 1 when sal BETWEEN 100001 and 200000 then 2 when sal BETWEEN 200001 and 300000 then 3 when sal...
asked by 07.12.2015 / 18:25