Questions tagged as 'plsql'

1
answer

What is the syntax to add a field to a column?

I need to know the syntax to add a field to a column, that is, I have to create an anonymous block where I ask the user to write me a name, after that I have to create a procedure to add the name that has given me past. Here I ask the user to...
asked by 07.04.2018 / 20:13
2
answers

How to select an inner join with multiple rows?

I have a Query with which I try to bring several values with a single inner join, but the question is that it brings me the different values as rows, therefore I repeat data, what I want is to make a selection of each value that bring the inner...
asked by 15.02.2018 / 17:43
1
answer

Matrix in PL / SQL

I have the following question: I have three columns: the product selected by the customer in month 1 and the product selected by the customer in month 2 and the number of customers that have this provision and I want to make a matrix of which...
asked by 30.10.2017 / 15:39
1
answer

Can I use the return of a stored procedure as part of the where clause?

The idea is that the stored procedure returns a set of identifiers. Ex. pra_id: 303 404 Currently this is what I am trying to do, and it is to use the return of the pra_id as filters: SELECT rea.rea_id, rea.pra_id, etr.etr_id, etr.etr...
asked by 13.10.2017 / 00:02
1
answer

sql query from vb6 to oracle

I need to insert an insert from VB6 to an Oracle database, I changed the procedure, according to the help they already gave me, respecting the Oracle syntax. but now I get Now I get the error "invalid column name", could you help me with some id...
asked by 30.08.2017 / 14:49
0
answers

How to execute a procedure in a View? SQL Server 2012

In my Procedure a dynamic query is executed (use PIVOT ) where the last columns are dynamic, so when I want to create the view I have tried to use Openquery and OPENROWSET but always shows the same message.    You...
asked by 12.07.2017 / 01:14
1
answer

Error in Sql-Server when executing a stored procedure

I have 3 parameters that a procedure receives, how do I pass the values for the variables err_buff and ret_code ?, as null ?, I mark the errors of invalid number of parameters PROCEDURE XX7E_EXT_FAC(err_buf OUT VARCHAR2,ret_code OUT NUMBER, P_...
asked by 21.06.2017 / 19:39
2
answers

Prevent insert or update when there is already a record in the same group (triggers)

I want to make it impossible to insert or update when there is already a coordinador in the same departamento in a table empleados . CREATE OR REPLACE TRIGGER UnCoordinador AFTER UPDATe ON EMPLEADOS DECLARE BEGIN...
asked by 13.06.2017 / 13:25
1
answer

Update of a field with the result of a select that returns several PL SQL records

My query is as follows: I must make a query that adds the prices grouped by several concepts, then, insert those results in the totals column, only when the quantity is different from 0. It would be like this: Precio Departamento Uni...
asked by 19.05.2017 / 17:07
1
answer

plsql script does not return anything

I have a problem with this script since I have the database full but when executing the following the courses do not return anything DECLARE CURSOR VA_QUERY IS SELECT Business_Area_Cd , Business_Area_Name FROM EXMCPRA.BUSINESS_AREA;...
asked by 25.04.2017 / 16:25