Questions tagged as 'sql-server'

1
answer

Connection between two DBMS Sql Server

Is there any way beyond Linked to connect two DBMSs? Problem: I need to use tables from another database that is on another server with SQL SERVER installed. My current server is also SQL Server;     
asked by 26.10.2017 / 14:56
1
answer

Doubt - Query (Do not bring a certain record)

Good afternoon, people! Next, below is a query where it was to bring all the calls that have the description '' Block Customer - Defaulter '' and with id = 572 (clients blocked), however, in that query there are some clients with already been...
asked by 20.07.2017 / 22:46
1
answer

SQL query is not grouping

I am new to SQL and I am trying to group the data according to the query below, but it is not grouping. The correct one was to exit, for example select left(P.ProjDesc,6), COUNT(P.ProjID) from Projetos P where P.ProjStatus <> 9...
asked by 20.07.2017 / 16:45
1
answer

What is the best way to save multiple image links in a database?

List<String> _lista = new List<String>(); [HttpPost] [ValidateAntiForgeryToken] public ActionResult Create(Veiculo veiculo, HttpPostedFileBase[] file) { for (int i = 0; i < file.Length; i++)...
asked by 05.09.2017 / 18:10
1
answer

SQL SERVER 2008 r2 - TEMPDB ERROR

Good morning, does anyone know a solution to this error: Msg 8921, Level 16, State 1, Line 1 Check terminated. A failure was detected while collecting facts. Possibly tempdb out of space or a system table is inconsistent. Check previous errors...
asked by 08.09.2017 / 13:17
1
answer

How to decrypt records from a SQL column - Query

Good morning! Well, how to decrypt records from a column in an SQL query. The field I want to decrypt is coluna MAX(A.Descricao) [Descrição da Última Providência] . SELECT CONVERT(DATE,T.TarData,103) [Data de Abertura], CONVERT(DA...
asked by 04.07.2017 / 16:50
2
answers

How to reduce the execution time of a query in SQL server?

I have a query that when it runs it is taking a while to bring results. And I do not know where to start to improve this query. If anyone can help me I'll be grateful.    The query copies a record that is in a reference table that   has two c...
asked by 05.10.2017 / 13:51
1
answer

Check triggers linked to a given table

I use the database Sql Server 2012 And the tool SQL Server Management Studio 2012 How can I check the triggers that are bound to certain tables without having to go through the object browser? Is there any select or so...
asked by 13.06.2017 / 21:51
2
answers

UNION with 2 DATABASES, SQL

I need to integrate 2 TABLES from DB different into a same DGV . I found several tutorials, but none that helped me from configuration to the connection, at least not the way I work with the connections. Follow an ex. o...
asked by 26.04.2017 / 15:37
1
answer

Compare variables with values from a SQL Server table C #

I have 1 table with 2 columns ( Code and Value ). I'm writing a code in C # and I have a taxpercentage variable. What I need is to return the Code column value, when the variable taxpercentage is equal to the column Value . I h...
asked by 26.04.2017 / 19:19