Questions tagged as 'sql-server'

2
answers

convert rows to columns in sql 2012 [closed]

hi how are I have this query SELECT nom_emp, ISNULL (LENTES,0)[LENTE], Fecha_Gestion, ISNULL (AYUDA_ODONTOLOGICA,0)[AYUDA ODONTOLOGICA], Fecha_Gestion FROM (SELECT me.nom_emp,Fecha_Gestion,TB.Tipo_Benef,Monto F...
asked by 07.03.2017 / 16:12
4
answers

Filter by dates in sql server

I need to be able to perform a query in which I must filter by dates, in which I have start date and end date and that the query gives me results that are within the range of those two dates     
asked by 11.11.2016 / 23:42
2
answers

Clause COUNT (1) and DENSE_RANK ()

I have the following query on sql server, the goal is to bring the records of the Personas table that are related to ListaMarketing_persona but since this is an AnyToAny table that joins ListaMarketing , there may be several...
asked by 18.11.2016 / 19:55
3
answers

How to know if a temporary table already exists

I have an SP in which I create a temporary table in the following way: SELECT * INTO #TABLA_AR FROM TRABAJADOR WHERE AREA IN (3,5,9,15) The SP has several processes and if it fails in some process after creating the temporary table, when co...
asked by 07.11.2018 / 19:58
2
answers

Insert a related table record from c # to sql server

I need help! I'm working with inheritance. Client: Person and I need to insert from the Client class, where the methods are (register, modify, delete, list). I need you to insert yourself in a method! The idea that I have is to identify the id o...
asked by 14.04.2016 / 12:09
2
answers

The result set has no current row

I'm doing a program of Libros and Autores where a autor has many libros . When inserting a new Libro I need to get id of autor to save it as fk_dni in table Libros , so I have...
asked by 30.08.2017 / 20:12
2
answers

Enter data from query .sql to table by parts

I have a database dynamically attached to my asp.net mvc project, with 12 columns to fill with test data, since I do not find a software that generates exactly the data I need and the limits of each one as age, names, dates, etc. I think that a...
asked by 10.03.2016 / 19:55
1
answer

Use the COUNT () function and a WHERE in the same Query

I have the following query: SELECT COUNT(IDPROVEEDORES), IDPROVEEDOR FROM PROVEEDORES WHERE COUNT(IDPROVEEDORES) > 1 But I get the following error:    Incorrect syntax near the keyword 'where'.     
asked by 22.05.2018 / 23:53
2
answers

Error inserting data into a table in SQL Server 2008

I have a problem with the insertion of the following data in the following table: CREATE TABLE TB_ADMIN_MONITOREO ( FECHA_PROCESO NVARCHAR, FECHA_EJECUCION DATETIME, SERVIDOR NVARCHAR, UNIDAD CHAR, [LIBRE...
asked by 23.04.2018 / 23:16
1
answer

Number of Open Cursors in SQL SERVER 2000

Has anyone any idea how to check the number of open cursors in a SQL SERVER 2000 database? Thank you.     
asked by 13.07.2018 / 17:44