Questions tagged as 'sql-server'

1
answer

.dbml connection - Visual Studio 2017 (C # + SQL Server 2016)

In Visual Studio 2012, there was an option to create the connection file with the DB in (Add > new Item) and then choose the dbml extension file. In Visual studio 2017, where is it? I remember it's something with (Connection for SQL). obs....
asked by 01.05.2017 / 03:25
1
answer

Remove first character from Index

Good afternoon. I have a varchar with some numbers set @ID_CUSTOMERNUMBER = '01234567' I would like to remove the zero only if it is the first number of my variable, eg '0123456789' removing the zero would be '123456789' '123401234...
asked by 27.04.2017 / 18:32
2
answers

Read values from a column - C #

I need to read the values of a column called Code_Article and put them, but when the column is still empty, I run and give the error: p>    The object reference was not defined as an instance of a   object. Here is my code: conn.Open(...
asked by 28.04.2017 / 17:45
2
answers

SELECT per word in sql server without using Full Text Index

I need to query a table with the following words:    "Today was a rainy day" I need to search for any of these words. For example if you found the word "day" , you would have to return the record. That is, any of those words that I think...
asked by 03.03.2017 / 17:55
1
answer

Delete Duplicate Records by Group BY

Good morning, Does anyone know if there is a possibility to delete duplicate records as follows: I have a query that brings the result All fields are repeated except the NDO field, and NDOGroup, are these fields that are duplicating the...
asked by 31.03.2017 / 14:26
2
answers

Check Consistency of a SQL Server backup in C #

How can I check the integrity of the backup file of a SQL Server database in C # ?? I used the following namespace and classes to generate the backup: Microsoft.SqlServer.Management.Smo { ServerConnection Server Backup BackupD...
asked by 06.01.2017 / 18:33
2
answers

Capture values from one table and insert them into another table

I have a temporary table that I fill in with the result of a given query. Now I need to go through the data of this temporary table, line by line, and pick certain fields and insert them into another table, and in that other table, generate a co...
asked by 19.12.2016 / 19:15
1
answer

How to join the return of 8 query's into one?

I have 8 query's all have 5 unusual columns and some distinct columns,  Based on the common columns, can I display a single result of 8? Common Fields: F.CHAPA AS CHAPA, F.NOME AS NOME, F.FILIAL AS FILIAL, F.SECAO AS SEC...
asked by 25.10.2016 / 20:19
2
answers

Procedure to store in backup tables?

I have two tables, sales and salesProduct on account of the volume of information in these tables read / write operations are slow. I need to create a procedure that stores this data (from sales and sales tablesProduct), from a certain period, i...
asked by 23.11.2016 / 22:06
2
answers

Error Insert PHP OO Sql Server sqlsrv_query () expects parameter 1 to be resource, boolean given in

This class is giving me a confessing job to you that I do not see error here, I already saw in php.net I think I'm following all the logic and syntax. If anyone can help me solve this problem, I am very grateful. <?php include_once 'Conexao...
asked by 05.10.2016 / 23:47