Questions tagged as 'stored-procedures'

3
answers

SQL in the code or in the database?

I have a big question as to where to put my query SQL, whether in the code or the bank . I currently have a procedure that is set up according to the parameters I have, ie filtros . Procedure @escopoVerificacao varchar(MAX) =...
asked by 24.02.2015 / 21:20
0
answers

Recursive call error in nested procedures

I have some MySQL procedures to do the following: The main code will always call the procedure CALL sp_syncTabela . The sp_syncTabela will check if there is another specific procedure for tableName passed as argumen...
asked by 17.11.2014 / 21:46
1
answer

Accentuation-Based Error [duplicate]

Hello I'm developing a Hybrid APP that uses a PHP Webservice to send an email and call a procedure in MySQL by filling it with the same email data, until the part of sending the email is all OK it sends successfully, however at the moment I...
asked by 20.07.2016 / 13:12
2
answers

How do I get the primary key identity of an inserted record?

I need to create a stored procedure to insert a game into my database. A game relates to a league through the campeonatoJogo table. The tables are basically: create table jogo( codJogo int identity primary key, nomeTime1 v...
asked by 21.11.2016 / 02:33
5
answers

How to pass a list of values to a Stored Procedure?

I am creating a stored procedure in SQL Server 2008 R2 and would like to pass a list of values by parameter, for example: Table produto ---------------- | id | nome | | 1 | maçã | | 2 | pera | | 3 | uva | Stored Pr...
asked by 03.01.2015 / 14:10
1
answer

Parameter for unidentified Stored Procedure

I'm having a problem, which would be a mistake saying that there is no parameter being passed to the procedure . It is running the following code: cmdProcedure.Parameters.AddWithValue("@id", 0); Command: public List<Models.Admin>...
asked by 18.02.2014 / 18:10
2
answers

Simple SQL Query

I have a proc that gets the ID of a product. If it gets NULL, then it should list all products. If you get the specific ID, you should only list that product. Is there any way to do this without having to create a dynamic query?     
asked by 06.11.2015 / 14:16
1
answer

Procedure oracle to copy data between tables

I need to do a procedure that copies from my table TAB_FORNECEDOR, everything in it and go to table TAB_FORNECEDOR2. I need to make a cursor with a loop, a delete with commit first of all, can you give me a light on how to mount my procedure?...
asked by 16.12.2014 / 18:52
0
answers

SQL Procedures: can I use a table as a parameter for a procedure?

I am a beginner in procedures. I'm trying to insert data into a table using a procedure, where I get the name of the table, the names of the columns, and their values. How do I get the data types I want, such as a table or a column? Am I th...
asked by 13.09.2018 / 10:13
3
answers

How to access the code behind a Stored Procedure?

How can I access the code behind a stored procedure ? Home I am using Microsoft SQL Server Management Studio .     
asked by 30.06.2017 / 21:47