Questions tagged as 'sql-server'

2
answers

Help in the sql query (sum)

I'm doing a Query where I add the amount of products that I have after multiplying it .. This is the Query. declare @Sucursalid int set @Sucursalid = 1 SELECT i.sucursalid as SucursalID,( COUNT(p.id) * p.pesomililitros) AS Cantidad...
asked by 29.08.2018 / 18:12
2
answers

"Can not POST" in node.js and postman

It happens that I have this code, where I try to pass by the user parameter and password using as a postman tool, I'm honestly new to this so I do not know if I'm doing well or the code is wrong since I get this error in postman app.post...
asked by 05.09.2018 / 19:23
1
answer

Query of matches does not show record

I have a SQL query which looks for a table according to four parameters or if there are no parameters returns all the records in the table, the problem is that when searching for a title no results return and it is assumed that if have a match w...
asked by 03.01.2018 / 23:35
1
answer

Convert from RTF to Plain Text in SQL Server

I have a column in sql, where from an application I save data in rtf format, I would like to pass it to xml to use in a webservices. Is there any way to achieve this? Here's the example rtf: {\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttb...
asked by 29.01.2018 / 21:02
3
answers

Duplicate records except one column

Good morning everyone, I'm trying to duplicate these 3 records to another user This is the code that gets the result of the image. CREATE TABLE #TEMP (IDSOL INT not null PRIMARY KEY ,USUARIO VARCHAR(50) ,LastName varchar(255) NOT NULL...
asked by 25.01.2018 / 18:47
3
answers

How to join 3 queries in sql?

How can I show the following 3 queries in a single selection? select Top 1 NumOperador, Rendimiento, SdFecha from trfRendimientos where (NumOperador = @NumOperador OR @NumOperador = 0) and (MONTH(SdFecha)= month(@FechaDesde) and YEAR(SdFec...
asked by 20.07.2017 / 17:02
1
answer

CASE optimized clause

I have to make a query similar to SELECT CASE WHEN (SELECT MAX(Fecha) FROM Tabla) > '01/01/1900' THEN (SELECT MAX(Fecha) FROM Tabla) ELSE '01/01/1900' END The problem is that the (SELECT MAX(Fecha) FROM Tabla) is runnin...
asked by 13.07.2017 / 10:21
1
answer

Storage of a BD with EF in asp.net MVC project

I have a mvc web application that stores 2 files with extension .mdf and .ldf locally within the project, which I understand are the same ones that Sql Server uses and these are now inside the app_data folder that was generated with EF ....
asked by 10.03.2016 / 00:05
3
answers

Count between 2 columns of 2 tables

I have these 2 tables table 1 ---------------------------------- | articulo | Ubicacion | ---------------------------------- | 200116 | cy1112 | ---------------------------------- | 200116 | ee3091 |...
asked by 25.07.2017 / 22:00
1
answer

Convert Date to UTC in SQL Server 2014

Hello I have a record of calls made from different countries, I have the date and the country, the dates are adjusted to the time zone of each country, but I need to convert it to UTC, since I need to calculate the number of calls made in a mont...
asked by 13.12.2018 / 17:58