Questions tagged as 'sql-server'

1
answer

SQL Server JOINS vs Subquerys

I was doing some queries, and there was a need to perform grouping of a table that was in a JOIN within the query. For example. Sales table. +----+---------+------------+----------+ | Id | Cliente | Data | Vendedor | +----+---------...
asked by 20.03.2018 / 22:13
3
answers

Several tables that should represent a single entity

I'm updating a system that has eleven tables that represent a single entity, I believe by implementation error, as shown below: Entidade: Foo Tabela Foo1 - Campo1, Campo2, Campo3 Tabela Foo2 - Campo1, Campo2, Campo3 Tabela Foo3 - Campo1, Camp...
asked by 13.02.2015 / 13:13
1
answer

How to support columns added by the user without updating the EF model?

I have a C# application with a Entity Framework 6 "Database First" model created from the base structure of a SQL Server database, which belongs to third-party software. Users of this software can add user fields to some tables by de...
asked by 15.04.2014 / 16:39
1
answer

SQLServer Portuguese Error Messages - (LocalDB) \ v11.0

I'm developing an application with Entity Framework 6 using the Code-First approach. I want to configure SQLServer (LocalDB) \ v11.0 to display error messages in Portuguese without using SQL Server Management Studio . From the researc...
asked by 23.04.2014 / 15:24
2
answers

Table does not appear in EDMX models

I have a problem in an application that I'm developing, I created the templates using the ADO.NET Entity Data Model. But a specific table is not showing up below the script I'm using to create the table, it's created and it works but no templ...
asked by 15.11.2015 / 17:53
2
answers

Selecting a value from a row / column of the ListView populated by LINQ to SQL

Through the double click event I need to pull a value from a row / column in a ListvView populated by LINQ to SQL. For example, when the user needs to select a row / column value from this ListView, after the double-click event, this informati...
asked by 23.01.2016 / 21:43
4
answers

BETWEEN requires arguments in ascending order? Because?

I have the following dummy table. I created the following query: SELECT * FROM ALUNOS WHERE IDADE BETWEEN 10 AND 15 Returns students A, C, and D. Now, because when I reverse the order in BETWEEN SELECT * FROM ALUNOS WHERE IDAD...
asked by 10.12.2015 / 16:13
1
answer

Return last value entered in the table where the value is not identity?

I would like to return the last value of the primary key inserted in the table, but my primary key is CPF so I can not use SELECT SCOPE_IDENTITY() .     
asked by 24.04.2017 / 16:24
3
answers

Inserting registry and retrieving ID generated by SQL Server 2012

I want to insert a record into a table, retrieve the ID that was generated by AUTO_INCREMENT and insert records into other tables, using that ID. But, I want to do this all using BeginTransaction . How could I do this? I'm doi...
asked by 23.11.2015 / 12:49
2
answers

Delete all tables from a bank at once

Is there a way I can delete an entire database at a single time? It is not drop , it is to delete only the records of all the tables belonging to the database.     
asked by 23.02.2015 / 19:46