Questions tagged as 'sql-server'

2
answers

Problem with FileStream in C # (Access denied to the path)

Buen día tengan ustedes. I have the following problem, I use Visual Studio 2013, I have created a system where the basic operations are done (search, delete, enter), linked to a database created in SQL SERVER 2008. The problem is when I trie...
asked by 23.02.2017 / 18:50
2
answers

Show columns that have SQL SERVER value

Good I have this table that has as 100 columns as the image and the query but what I want is only to obtain the columns that have amount just choose these columns: Numero prestatamo NumeroCuota Fechavencimiento columns that have an...
asked by 21.02.2017 / 23:05
2
answers

sql query with double rank using between

The human resources department needs a report that shows the surname and date of hiring of all employees hired in 1995 or 2005. How do I do that if the data of the date is a datetime type and the range it asks for is only the year?     
asked by 12.06.2017 / 21:16
2
answers

how to avoid data duplication

I need that before executing the data insertion to sql that I am consulted if there is the same data in this case I have a field called cedula which is the one I intend to use for the verification but I do not know how to perform the query...
asked by 13.06.2017 / 00:41
1
answer

generate a condition and run inside an IF

Good day everyone, I hope and someone has worked with my requirement. I have a query which is executed inside an SP, I would like it to be inside a condition (IF) and that if there is an error in the execution, it will send me an adventencia mes...
asked by 19.01.2017 / 19:08
1
answer

Make column ItemID SQL Server 2008 R2

I have 2 Rows of name Type and TypeID I need to create a call ItemID that the itemID pick up the digits of the rows type and TypeID but that always the typeID is filled with zeros in case the numb...
asked by 20.01.2017 / 06:20
2
answers

How to pass selected items from a checkedlistbox to a listbox with C #?

Hello everyone, first of all thank you for taking the time to read me. I am doing program using visual studio 15 community programming from C #. In the program I connect to a database made in SQL Server 2008 from which I obtain keys for some pro...
asked by 19.01.2017 / 20:35
1
answer

Create a record for each field stored in a temporary table

I have the following query where in a temporary table I keep every Monday between a range of dates. DECLARE @TEMP TABLE(REGISTRO DATE) DECLARE @startdate datetime = '2017-01-19' DECLARE @enddate datetime = '2017-02-19' ;with cte(col) AS ( SELE...
asked by 19.01.2017 / 23:52
2
answers

Methods to call Store Procedure from C #

I have this method to execute stored procedures public void EjecutarSP(string sp) { try { SqlCommand cmd = new SqlCommand(sp, ConexionBD.con); cmd.CommandType = CommandType.StoredProcedure;...
asked by 03.02.2017 / 14:33
1
answer

Create trigger Sql server

I have this statement to import data to the test table, what I need is to create a trigger. BULK INSERT PRUEBA FROM 'C:\prueba.CSV' WITH ( -- seteamos el separador de campos FIELDTERMINATOR = ',', --seteamos el separador de registro ROWTERMINA...
asked by 27.12.2016 / 11:49