Questions tagged as 'pl-sql'

1
answer

Perform the sum of an added field - PL / SQL

I need to sum a field to which a sum was made according to the example below: SELECT A.*, B.* FROM (SELECT DTAGENDA, AG.CODITPROD, CD, ROW_NUMBER() OVER(PARTITION BY AG.CODITPROD, CD ORDER BY DTAGENDA) AS RANK, sum(QTAGENDA) QTD_AG...
asked by 04.07.2017 / 20:34
2
answers

Change the characterset of oracle 11g

When performing a dump file import, oracle is returning the following messages: IMP-00019: Line Rejected Due to Error 12899 ORACLE IMP-00003: Oracle Error: 12899 found ORA-12899: too large value for column "USUARIO"."TABELA"."COLUNA" (...
asked by 22.05.2017 / 19:52
1
answer

Add values and subtract values from another condition

Good afternoon I have a table named TITLE In it I have got columns with name CODOPERACAO, VLROPERACAO, DTAOPERACAO I have 2 different CODOPERACAO records which are: 16 = Inclusion of title 28 = Payment of the title There may be more tha...
asked by 19.05.2017 / 23:10
1
answer

Condition and loop within a function

I am creating a function to output inventory, where v_saldo_item_peps is a function that returns a table, with the items that have balance, in their respective entries. I need to check if v_saldo_item_peps returned some result a...
asked by 19.06.2017 / 16:30
0
answers

Add column to SQL considering some conditions to be valid

I'm trying to put together two pieces of information and I'm not getting it. I set up this SQL to bring me only the products that were purchased that had a discount through a contract. But this discount was registered for the product categori...
asked by 19.06.2017 / 22:59
0
answers

How not to convert an exponential number to decimal?

I'm having the following problem: I created a function to put the thousand point (s) in the values that it receives as parameter (VARCHAR2). This function receives integer values and values of type VARCHAR ('Some text'). When the value is not...
asked by 12.04.2017 / 19:56
1
answer

Grouping of lines Group By

I have the following query: SELECT distinct CAPA.COD_HOLDING, CAPA.COD_MATRIZ, CAPA.COD_FILIAL, CAPA.ID_NF_ENTRADA, CAPA.NUM_NF, CAPA.DT_ENTRADA, CAPA.DT_EMISSAO, CAPA.COD_CLIFOR, CAPA.COD_UF, CAPA.CGC_CPF,...
asked by 04.01.2017 / 18:48
1
answer

Oracle email attachment plsql goes empty

I have the PLSQL block below listed, the email is sent but the file that should be attached arrives empty in the destination email. Send an existing file, right? What am I doing wrong? Thankful declare ds_email_origem_w varchar2(30)...
asked by 27.01.2017 / 13:58
1
answer

List all synonyms in Oracle

How do I list all synonyms in my database? I need to know which ones are created to compare what exists between banks. I've tried the following code but it does not return synonyms: select * from all_objects     
asked by 07.11.2016 / 21:15
2
answers

No update of a PL / SQL collection

I'm trying to update a parameter in a table, based on previous values of a collection , it will update the id attribute of a given document table id. I also created an insert into a test table, which performs perfectly, all attributes. I do not...
asked by 10.10.2016 / 23:57