Questions tagged as 'stored-procedures'

1
answer

Passing Parameters to Store Procedure

Follow the Search Function Code public List<Pessoa> Buscar(string Nome) { using(var db = new MyContext()) { var Result = db.Database.SqlQuery<Pessoa>("EXEC SP_Busca_Cliente @Nome", Nome).ToList(); return Re...
asked by 02.10.2017 / 15:17
1
answer

How to assign an EXECUTE SP_EXECUTESQL @SQLSTRING to a temporary table

Is it possible in the same script to create a temporary table from a run like this? --****************************EMPRESA****************************** if(Object_id('tempdb..#TBEmpresa') is not null) drop table #TBEmpresa go CR...
asked by 14.06.2017 / 17:18
1
answer

Stored Procedure with if

I have a table with the name, id, and salary fields. I need a procedure that changes the employee's salary, if it receives one, it should raise the salary by 300 reais, in case another amount decreases the salary by 500 reais. Do you know...
asked by 29.09.2017 / 01:01
1
answer

DataGridView displaying incomplete id

The grid displays only the first character of the "ID" For example: if the ID is 16 it displays 1; If it is 20 it displays 2; But from 1 to 9 displays correctly ... Codethatselectsdata...privatevoidlixeiraDialog_Load(objectsender,Event...
asked by 30.08.2018 / 22:10
2
answers

What are real and practical examples of using Stored Procedures?

While attending an interview for the developer position, I come across a question related to Stored Procedure SP ) and at first I have theoretical knowledge on the subject, but I have never come across a practical example in the use of SP and...
asked by 04.12.2017 / 19:31
1
answer

What would be Pro * C / C ++?

From what I saw it is using in Oracle, but can I use it with another bank? Pro * C / C ++ is useful today? Could you pass an example code? Does it have PL / SQL difference? Or are they used together?     
asked by 08.08.2017 / 13:47
1
answer

Doubt in converting rows into columns Sql Server 2012

I've transformed rows into columns and need to improve this query by adding another column row: This is a query: --****************************EMPRESA****************************** if(Object_id('tempdb..#TBEmpresa') is not null) dr...
asked by 24.06.2017 / 20:18
2
answers

Mounting dynamic query with Stored Procedure in SQL Server

I need to mount a conditional query with a stored procedure, to make my problem clearer, I'll expose the sp here with what I want it to work, look at the end where I use the IFs, that's the problem. USE [MarcenariaDigital] GO SET ANSI_NULLS ON...
asked by 08.11.2015 / 19:05
1
answer

Allow a user to view stored procedures created by other users

I have a MySQL database populated with some stored procedures . The problem is that two different users have created several procedures, so that only the user who created the stored procedure can see its contents. In this context, I would like...
asked by 17.11.2014 / 16:56
1
answer

Assign a variable to a Dynamic Data?

My goal is to create a procedure in SQL Server , which has by default two variables, one with the start date of (hoje - 3 anos) and another as the end date equal to hoje . I already use for other operations (for example a between)...
asked by 23.05.2017 / 20:22