Questions tagged as 'sql-server'

1
answer

union of 3 tables in one

Hello world programmer ....... I have a doubt I hope you can help me what happens is that I have a table in sql with the following fields: LINEA varchar(10) primary key GRUPO varchar(10) primary key SUB_GRUPO varchar(10) primary key ,DESCRIPC...
asked by 24.08.2017 / 23:51
1
answer

Transpose columns in SQL with PIVOT?

Someone can easily explain me an example with PIVOT to transpose columns by rows in sql. I have several data represented as follows: FECHA ERROR1 ERROR2 2017-01-01 12 23 And I would like to transpose t...
asked by 17.08.2017 / 09:34
3
answers

Verify that there are no duplicates before doing INSERT

I am programming in Visual Basic with database in SQL Server, and I can not do that when inserting a new record in the database, do not let me do it if the following conditions are repeated: That the record does not have the same number Th...
asked by 24.07.2017 / 20:00
2
answers

How to rotate (pivot) the records of a table

Good day, Prové with a normal pivot and it does not work for me since the names of the columns must be specified but in this case I do not know if it is a matter of pivot. How can these results be obtained? Is it possible? DECLARE @TEMP_INC...
asked by 26.07.2017 / 16:52
1
answer

how can I activate IntelliSense in SQL Server 2014 when I connect to a server in azure?

Being connected locally and writing a query IntelliSense works normally, generates the autocomplete aids. But when connecting to a Microsoft Azure bd instance, the IntelliSense stops working. I found a post on English stackoverflow, where they r...
asked by 11.08.2017 / 03:48
1
answer

Error connecting Java to SQL Server with JDBC

Good morning, I have the following code public class main { private static Connection cn; public static Connection getConexion() { try { Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");...
asked by 11.08.2017 / 22:29
2
answers

Operator LIKE does not work in my app vb.net

Greetings to all. I have the following problem I have a procedure stored in SQL Server that retrieves data with the like operator, but it does not work for me. create procedure recupera_art @cadena char(40) select * from articulo where clave...
asked by 16.01.2018 / 22:08
2
answers

Selection of specific text in a field

I recently created a table in SQL Server , within that data I want to select descripcion those with the word Ropa and show them to me, so use the command SUBSTRING next to CHARINDEX to obtain my specific results...
asked by 19.07.2017 / 20:26
1
answer

There are no primary or candidate keys in the table referenced

Hi, I have a problem with
asked by 13.07.2017 / 05:08
1
answer

Query about SQL INNER JOIN SELECT TOP 1

I have the following question: in a table I have a ID that is related to the other table, but the daughter table has several ID of the table Father then at the time of doing the INNER JOIN brings me N records. I'm tr...
asked by 13.06.2017 / 18:55