Questions tagged as 'sql-server'

1
answer

How to count the columns that were updated in a trigger?

I have the following table called Movies : (id int, nombre varchar(50), genero varchar (50), clasificacion char(1), año int) I have this trigger to validate that only one field can be updated at a time in that table. Would there be a...
asked by 22.11.2018 / 06:06
2
answers

System.Data.SqlClient.SqlException: Could not find stored procedure

I'm trying to do a WebMethod that gets me all the information from a table. public void HelloWorld() { var Lista = new List<Atributos>(); using (var con = new SqlConnection(cnn)) {...
asked by 15.11.2018 / 23:01
1
answer

SQL Server - Bring extra data with a Group By

I have a table with different terminals. In it, the terminal number and its different measurements are recorded every 15 minutes (that is, the terminal number will be repeated many times in the table, but each record with a different date). Exam...
asked by 19.09.2018 / 15:55
1
answer

Help with consultation in AJAX

I am using ASP.NET, C # and AJAX. What I need to do is send a number of n questions for an exam, where that amount n is a number that the administrator previously registered in a form that sends the data to a database. I already managed to g...
asked by 01.10.2018 / 19:24
1
answer

Query on sql server does not return desired result (JOINS)

I'm trying to make a query in SqlServer, but it does not display the desired result. I have a table where I keep licenses @TblLicencias and another where I keep in which team install those licenses @TblInstalacion, increasing the correlative...
asked by 14.09.2018 / 01:55
3
answers

Limit content according to user

I have a question about how to limit the options that a user sees in a form in my select / option I want the user id = 1 to only see the clients that I assign (let's say the client1 and clients5) I am free to add fields for this purpose in my...
asked by 06.09.2018 / 17:11
1
answer

Split in SQL of a select

Hello friends, I have a very simple query, let's say it is select puesto from puestos and give me back the following | 1 | Oficial Policiaco | | 2 | Juez Amparo | | 3 | etc etc | I need to separate this select and accommodate somethi...
asked by 01.11.2018 / 23:47
2
answers

Problem with SQL query and Group By

I have the following query that I do in SQL Server select distinct f200_razon_social, f200_nit, f253_id AS Numero_auxiliar, f253_descripcion AS Auxiliar, SUM(f353_total_db - f353_total_cr) as TOTAL from t350_co_docto_contable INNER JOIN t200_...
asked by 06.09.2018 / 19:09
1
answer

Display user tables using sqlcmd

I have the following statement to connect to the database: sqlcmd -S tcp:ip -U usuario -P password How can I know which tables are created by that user and their structure? I tried with select name from sysobjects .. But I have not...
asked by 13.09.2018 / 23:01
1
answer

How to save a common table expressions (CTE) to a variable in sql

Hello, I'm trying to save the value of a common table expressions (CTE) in a declared variable. This is all I have. DECLARE @valor decimal(12,0) with xc as ( select v.productoid, p.nombre, eq.unidadid,...
asked by 30.08.2018 / 19:45