Most voted "sql-server-2014" questions
58 questions
Sort by count of
-
17
votes3
answers960
viewsHow to find a String from Regular Expressions
I have a field in the SQL Server 2014 database that stores the client address. The problem is that everything is stored in a single field varchar. Here are some real examples: Antonio José Nerchis…
-
6
votes1
answer232
viewsUser who has permission to create other SQL Server users
I’m trying to use a user other than SA to create new users on an SQL Server 2014 basis, I’ve tried the roles db_accessadmin and db_securityadmin, but they do not give permissions to change other…
-
6
votes2
answers43536
viewsError doing Insert - String or Binary data > would be truncated
By making this Internet: INSERT INTO t_cmo_oit1980_leitura(id_oit_let,id_oit,rx_num, dt_rx) SELECT (1), (SELECT id_oit FROM t_cmo_oit1980 WHERE id_oit = 6574), (SELECT rx_num FROM…
-
5
votes1
answer7721
viewsHow to change the language of Microsoft SQL Server Management Studio?
The image file . ISO of Microsoft SQL Server 2014 Enterprise available for download through Microsoft Dreamspark exists only in version en. Could you change only the language of the Management…
-
5
votes1
answer3359
viewsError; Connection has not been closed. Current connection status opens Sqlserver 2016
I am creating an application in visual Studio in C#, and when connecting to sqlserver in Server Explore, everything was correct in connection test. This is my connection string: return "Data…
-
4
votes1
answer643
viewsProblem with Decimal (4,2)
I have an MVC project, I am using Entity Framkework and in my database there is a table with a column of type decimal (4,2). The problem is: I try to insert any value, for example: 5.00 // 5,00 //…
-
4
votes1
answer155
viewsIs Visual Studio 2013 compatible with SQL Server 2014?
I connected the SQL table with Visual Studio, but at the time of moving the table appeared a message saying that SQL Server was not compatible. If not, I’ll have to download another Visual Studio or…
sql-server visual-studio-2013 visual-studio sql-server-2014asked 9 years, 4 months ago Márcio Cristian 399 -
4
votes3
answers3464
viewsAverage between 3 direct dates in sqlserver bank?
What is the most efficient way to calculate the average of dates in the same column by the sqlserver database? I need to take the date of the last 3 sales of a customer, and return in days to know…
sql-server sql-server-2012 sql-server-2008 sql-server-2014 sql-server-2005asked 9 years, 3 months ago Laísa Ferreira Cardoso 116 -
4
votes1
answer3554
viewsDifference between SQL Server Express versions?
What’s the difference between SQL Server Express versions of Dreamspark?…
-
3
votes3
answers419
viewsHow to know if a key in sql server is Identity
How do I know if a key in sql server is Identity? How do I find out? The version is 2014.
-
3
votes0
answers161
viewsSearch in sql server 2014 with php
I am using Sql Server Express, I have an instance installed individually on two virtual machines on the server, one of the instances installed is the Sql Server 2008, and the other is Sql Server…
-
3
votes3
answers8033
viewsDo not repeat records in a Join
I have two tables: one with 1009 records and another 11949. When I do a Join, I have 11949 records, of which 1009 table records are repeated several times. I need to select with Join, but bring only…
-
3
votes2
answers614
viewsIt takes time to count records the first time
I’m doing a stress test on an app I’m developing. I added a few million records to a table, which is what it will have in about 5 years of use. I use Entity Framework. By counting the records of a…
-
3
votes1
answer174
viewsGenerate number using Identity
Is it possible to generate a number before writing the record to the database? Use field identity do SQL Server 2014. Work with Delphi Berlin.
-
2
votes1
answer406
viewsError starting Powershell on Windows Server 2008 R2. How to resolve?
I have installed SQL Server 2014. When starting Powershell in Windows Server 2008 R2 and I do the command "sqlps" to test, happens this error that shows in the image below... NOTE: On another…
-
2
votes1
answer763
viewsInsert with two different selects
That one of mine insert is not working. insert into t_cmo_oit1980 (id_oit, id_exm_rea) select max(id_oit) + 1 from t_cmo_oit1980, select id_exm_rea from t_cmo_Exame_Realizado where id_exm = 3936 and…
-
2
votes1
answer567
viewsSQL SERVER EXPRESS 2014 ERROR (Microsoft SQL Server, error 1225)
Good morning, all right guys? Following work with database, and we are having some problems with SQL SERVER 2014 x64, on Windows 10. I am doing the installation normally and changing the network…
-
2
votes1
answer1751
viewsImprove slow query performance on MS SQL SERVER
The indexes are incorrect? I’m having trouble optimizing a consultation. I had done another question for a simpler case that solved, but for this case I’m not getting a better result. The following…
-
2
votes1
answer236
viewsDebug Proc in sql server 2014 database
I use Sql Server 2014. I am having problems with Stored Procedure, because when running with certain filters, it triggers this error: Message 512, Level 16, Status 1, Procedure…
-
2
votes2
answers2067
viewsOrder change of Sql columns?
Good morning Could you instruct me to change the order of the columns in a table? Example: I have the Table IcmsMvaUF in the following order: I’d like to pass the column MvaEmpresa to come first, to…
-
2
votes2
answers711
viewsINNER JOIN + LEFT JOIN
I’m trying to make a query where the data lies in 4 tables: TAFCBHISTPED = NUPED, DTEMIS TAFGRPROD = CDGRPR, DSGRPR TAFPROD = CDPROD, CDGRPR TAFITHISTPED = NUPED, CDPROD, QTPED My query stayed that…
-
2
votes1
answer3485
viewsChange varchar field yyyy-mm-dd hh:mm:ss to data dd/mm/yyyy in SQL Server
Guys, I’m extracting the data from a satisfaction survey log, and I’m trying to create a column with the date format, so I can group the days and months into an Excel dynamic table. For more…
-
2
votes1
answer78
viewsConcatenation of Records via FOR XML PATH - SQL SERVER
Good afternoon dear, I have the following problem: I am developing a Query where I need to verify which documents were delivered by the student, documents that are in the table pre_matricula_doc and…
-
2
votes2
answers66
viewsSee table by period
I have two tables, "Contact" and "Pedvenda", how can I make a query that manages during a period, for example, from 01/01/2019 to 30/01/2019 the quantity of sales between 10:00h and 16:00h each day…
-
1
votes2
answers685
viewsSchema permission in specific user
I created a standard database and created some schemas within this database. I created users for each schema, now I want to give full permission for each user in their schema only, as I should do?…
-
1
votes1
answer2047
viewsChange time in sql server 2014
Good morning, as can be seen in the image below, I made a select to get the current date and the same is +3. How can I change this date/time?…
-
1
votes1
answer402
viewsWhen choosing a company connect to the Database
Aguem could help me I’m doing a project to deliver this year in college in 4 layers I have a login screen and when I type user and password I choose the company I should work example Company A,…
-
1
votes0
answers29
viewsMobile Report - Reporting Services 2016
This is my first post in the community and I hope to be able to collaborate with my question. I am working on a BI project where I need to show a quantitative number of calls on a map, according to…
report sql-server-2012 reporting-services sql-server-2014 business-intelligenceasked 8 years, 1 month ago Rafael Lima 111 -
1
votes0
answers133
viewsScheduling form with multiple items that need to be rented at the same time
I need to make an agenda to register: The information on scheduling Register multiple instruments at once with scheduling information The button Buscar cliente pulls the data(Client ID and Name)…
-
1
votes4
answers11284
viewsHow to create temporary mirror table in another
It is possible to create a mirror temporary table in another? Example: Let’s say I have in my bank a table with 60 fields. I would like to create a temp with the name #table with the same table…
-
1
votes2
answers950
viewsIf an int variable does not receive anything from select it is zero or not
Let’s say I have this block: declare @teste int declare teste_cur cursor for select campo1 from tabela ..... while @@fetch_status = 0 begin set @teste = 0 select @teste = campo1 from tabela where…
-
1
votes1
answer667
viewsAssign a cursor value to a table column
I have a cursor. I need an Insert to insert the value of each cursor position into a table. How do I do this? I need to enter the cursor value exame_cur. My code below: set nocount on declare…
-
1
votes1
answer272
viewsConnect Sql Server 2014 to Django 2.2
I am trying to connect the Sql Server database to Django but am getting the following error(The connector I am using is Django-pyodbc-Azure): Django.db.utils.Interfaceerror: ('IM002', '[IM002]…
-
1
votes2
answers311
viewsBring the count of the word "DATA" from a column calculated in SQL Server
Good morning, I have a query that brings in a column calculated the information of "Data" and "Historicos", in this column I have the item Prefix (vehicle plate) and the column with the respective…
-
1
votes1
answer53
viewsRecover orders customer 1. DUPLICATION ERROR
My code: SELECT Pedido.NumPedido , Pedido.CdCliente , Cliente.Nome , Produto.CdProduto , Produto.Descricao , PedidoItem.Quantidade , PedidoItem.ValorUnitario , PedidoItem.ValorTotalItem FROM Cliente…
-
1
votes2
answers421
viewsMy C# software with SQLEXPRESS Localdb database does not open on another PC, even installing all dependencies
1 - My C# software with SQLEXPRESS Localdb database does not open on another PC, even installing all dependencies. NOTE: My Development PC works perfectly. 2 - Programs I have already installed in…
c# sql-server sql-server-2014 sql-server-express sql-server-localdbasked 6 years, 8 months ago Dener Portela 9 -
1
votes1
answer69
viewsTreat a column of the same table twice and present as a record in the same column
Good afternoon Dear Friends, I am developing a report with some necessary standards, I will not delve into the standards for the query, but fact is that I "managed" to make a Query with the…
-
1
votes1
answer65
viewsHow to unite results of queries without mixing them?
How can I join 2 query results without mixing them? For example: The first query results in names starting with Victor, the second results in names containing Victor. Result of first consultation:…
-
1
votes2
answers905
viewsProblem creating a Foreign key
I created a table tbl_cond with a PRIMARY KEY calling for ID_cond When creating a second table with a FOREIGN KEY, being her ID_cond of tbl_cond, put the following code. use db_clientes create table…
-
0
votes0
answers206
viewsError while trying to connect sql server 2014 with Hibernate-core 5.2.7 Final
I am learning java with Ibernate. I am using Maven to manage the project. I can think of the following INFO error: HHH000206: Hibernate.properties not found as below in the image (click on the image…
-
0
votes1
answer68
viewsDoubt to Load Combobox from an account with the sub account
I made a select to fetch an account and upload the sub account and would like your opinion to see if this is how you do it code private void cbbConta_SelectedIndexChanged(object sender, EventArgs e)…
-
0
votes1
answer1553
viewsPopular table in sql server with data coming from an excel spreadsheet
How I create a script or via DTS, a popular form of a table in the sql server 2014, with information from a spreadsheet of excel? The worksheet has several columns, but only two columns will be…
-
0
votes1
answer3342
viewsGenerate database script with structure and data
Backup is not possible to do, because it depends on permission from France and etc. So, the solution we found here was to try to generate a script that copies not only the structure of the tables, I…
-
0
votes1
answer707
viewsBulk insert into a table
I have two proc’s that my VB system already uses. One for Insert and one for Update. I need to use it now, directly in the database. The target table has a composite key, as follows. A field called…
-
0
votes4
answers2146
viewsSQL - Draw random lines
Given the table as an example: I want to draw, between the lines with the same order number, a single line, that is, one of order 1, one of order 2 and one of order 3, randomly. I need a generic…
-
0
votes1
answer37
viewsHow to join two results in a conditional query
Talk, you guys! Would anyone know how to use a Union All on parole? Example: DECLARE @cond INT = 1 SELECT * FROM table1 IF(@cond = 1) BEGIN UNION ALL SELECT * FROM table2 END The idea is this but…
-
0
votes1
answer100
viewsSubtraction between two fields of the same value does not give zero-SQL Server
Someone could explain to me: I made a Join between two tables. Both bring the same value in their fields. And when subtracting one value minus the other, it does not give zero. As this is possible?…
-
0
votes1
answer59
viewsCondition(if) does not work for entering data
I did this query to insert data. I should only insert data if there is nothing in the OIT1980 table. Then I mounted a cursor and walked and put an IF. If I remove the IF, it works, but if I leave it…
-
0
votes1
answer73
viewsUpdate and maintain update code when it repeats
I did this update: declare @rx_num varchar(20), @id_oit_max int, @id_exm_rea int, @id_xfc_novo int, @id_xfc int = 0 declare oit_cur cursor for select pl.rx_num, er.id_exm_rea, er.id_xfc from…
-
0
votes2
answers2827
viewsSQL Server Create a filter in a Datetime field, bringing the previous 24 hours (not counting the current time)
Good evening, I’m having trouble putting in a date filter, I have a query where I bring the information of CD, Crane and Dtregistro (datetime) In this query I am already filtering the 24 hours…