Questions tagged as 'sql-server'

2
answers

How to filter repeated series in SQL

I'm using SQL 2008 to query using inner join: SELECT t2.intencion_id,t2.numpago,t3.orden,t2.importe ,SUM([importeaplicado]) AS importeaplicado ,t3.intfinanciamiento_interes ,t1.[estatus] FROM [APLICACIONES] as t1 inner join movcargos as...
asked by 01.11.2016 / 21:05
1
answer

Query to show user data and show quantity

Hi, I am currently doing a query but I think that the number of working hours has blocked me. I try to show the id of a joint user with his first and last name, and to all this he shows how many prospects (clients) he has assigned. My user...
asked by 15.09.2016 / 17:22
1
answer

Java 7 connection to Sql Server 2014

I am trying to connect with java 7 to sql server 2014 and I get the following error:    The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "SQL Server returned an incomplete...
asked by 01.11.2016 / 16:52
4
answers

Horizontal line in a table in php

I want to put a horizontal line to separate data when viewing in a DGV in php, I use an 'echo' along with a '' to create the table, but I want to separate it by lines the records within the echo when creating the table, attach the code so far...
asked by 11.10.2016 / 19:37
1
answer

Error Handling in Sql

I have a stored procedure in which I add a query to a variable (by topic of dynamic tables). The problem is that when you enter a date and the table does not exist, the PRC falls. That's why I need to handle mistakes and I can not do it and I wa...
asked by 24.03.2017 / 13:15
1
answer

maximum value + 1 with case in sqlserver

How can I make a sql query where I select the maximum value of the folio column plus one, taking into account that the table may be empty the first time it is used, I have the following query but I think it is missing more. the query to get t...
asked by 02.08.2016 / 19:47
1
answer

SQL statement charindex

I have created a sql statement that traverses a string and generates columns with data. CODE: select p.FK_workitem, p.numero_sd, p.PARRAFO, LTRIM(substring(p.PARRAFO, 0, CHARINDEX(':', p.PARRAFO))) Tipo,...
asked by 27.12.2018 / 01:12
1
answer

Update column A in table X based on the value of column A in table Y

On a SQL server 2012 I have to do a massive update (record by record) of a column A in table X based on the value that same column has in table Y. The key is a serial number, How can I do this?     
asked by 20.12.2018 / 21:18
1
answer

Query Excluding duplicate records in SQL

I have a query in SQL server: SELECT [nIdLogTG] ,[nUsuario] ,[nConsDetalle] ,[nConsDoOrigen] ,(case when a.cCodigoComplementarioDo IS NULL THEN b.cCodigoComplementarioDo ELSE a.cCodigoComplementarioDo END) AS Cod...
asked by 18.12.2018 / 22:13
1
answer

Cut column text in SQL Server

I have a column of a table located on a Linked Server (from Oracle) that exceeds the varchar (Max) of a column in a SQl Server table. I need to cut the values to the Max of the column in order to pass the data through a SQL Server Job. This is t...
asked by 20.10.2016 / 22:23