Questions tagged as 'sql-server'

1
answer

Read and insert data into a table via C #

I have this code to insert values into a column of a table: conn.Open(); comm.CommandText = @"INSERT INTO ArticleBarCode(Code, Code_Article, BarCode, CreatedBy, CreatedOn, ModifiedBy, ModifiedOn, IsDeleted)...
asked by 02.05.2017 / 11:50
1
answer

Return dates between days quantity [closed]

I would like to know what I do: I want a variable of type days Then get the result of this variable and make a select between the dates counting the number of days Any solution or example?     
asked by 04.12.2018 / 21:03
2
answers

How can I do a C # query in a SQL Server database [closed]

I have a project under development on this internship and so I am working on new things. I would like to know how I can do in C # a data query present in SQL Server tables. Sorry if you're being too lazy.     
asked by 23.01.2017 / 15:34
1
answer

Does anyone help me find the error in this create?

CREATE TABLE PedidoProduto + ProdutoPedido ( Quantidade numeric(50), IDproduto int, IDpedido int, FOREIGN KEY(IDproduto) REFERENCES Produto (IDproduto), FOREIGN KEY(IDpedido) REFERENCES Pedido (IDpedido) ); No error gives this:    Message...
asked by 13.05.2018 / 22:13
2
answers

Error connecting to JDBC with local sql Server

I try to connect the java with the Sql Server from my local machine but I get this error com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host localhost, port 1434 has failed. Error: Connection refused: connect. Pl...
asked by 28.07.2014 / 17:23
2
answers

Add a line at the end of the query in MS-SQL

I have a query and it returns the following table: I would like to know if you can add another line (in this case 3) to make the difference between the two years. I wanted a new line that would give the difference of the two values o...
asked by 27.10.2015 / 17:08
1
answer

Help with Query [closed]

I have the following SELECT in SQL Server SELECT FTags.DateAndTime, TAGS.TagName, TAGS.TagIndex, FTags.Val FROM TagTablePoços TAGS INNER JOIN FloatTablePoços FTags ON FTags.TagIndex = TAGS.TagIndex WHERE TAGS.TagName = '[AGUA]FT[1].O...
asked by 14.03.2018 / 14:20
1
answer

Recursive SQL using CTE

I'm mounting an SQL statement using    Message 530, Level 16, State 1, Line 5 The statement was terminated. THE   maximum recursion 100 was exhausted before the end of the instruction. SQL Server version:   Microsoft SQL Server 2016 (S...
asked by 03.10.2018 / 15:07