Most voted "sql-server" questions
SQL Server is a relational database management system from Microsoft. Use this tag for all SQL Server editions, including Compact, Express, Azure, Fasttrack and PDW.
Learn more…2,752 questions
Sort by count of
-
1
votes1
answer30
viewsMigrate data from one DB1 table to another DB2 database table
I have 2 databases on Sql Server DB_1 and DB_2 being DB_2 a clone of DB_1 I am trying to migrate all data from DB_2 Ignition table (older data) to DB_1 Ignition table (newer data) so that the data…
sql-serverasked 4 years, 9 months ago Gabriel Silva 706 -
1
votes1
answer117
viewsHow to connect a python container Docker to a sqlserver
I want to create a python3 container that can connect to a SQLSERVER, I’m using Django in my application and it doesn’t have a native driver to make that connection. I created an image to configure…
-
1
votes0
answers143
viewsHow to add rows of data in a column in SQL Server?
I’m importing data from the Rais (ME). The state is Acre. I created two columns: Uf1 and Ano1. In Uf1 goes the information AC and in Ano1 receives the information 2014. Note that insert, in the…
-
1
votes2
answers76
viewsDisplay values in one table but not in the other
Good morning. I’m new to Database and SQL, and I have a question in a college exercise. The objective of the exercise is: I was able to do the part of presenting the number, description of the…
-
1
votes1
answer40
viewsHow to add 0 in a column?
I am beginner in SQL language and would like a help to run a query. I need a new column with the data: code+size+color (I concatenated and it worked) the problem I can’t solve is that the color…
sql-serverasked 4 years, 8 months ago Derick Oliveira 13 -
1
votes2
answers59
viewsAverage between select results
I need to calculate the average repair time for each application. Knowing that I have in hand the repair code, application code and time for each repair, what would be the best way to perform this…
-
1
votes0
answers82
viewsExport image saved as Varbinary in different formats
I have some images in the SQL Server 2017 database that were recorded as varbinary. I already have a script that exports as . jpg, but I found that some images are actually . png or . bmp. Is there…
-
1
votes1
answer57
viewsProblems with displaying data from an array
I’m new to stackoverflow, but that I use the platform to cease my direct doubts, had never made an account. Anyway, I have an atypical problem with a PHP code. I’m making a query to the database…
-
1
votes0
answers67
viewsimage and write to the sql database in the image field
Good afternoon. I have a little problem with my code, and I need some help. I am inserting an image in my form in an image field, now I need to take this image and write an image field in a field in…
-
1
votes1
answer48
viewsSELECT displaying the same field several times from a calculation
I started studying databases, I am using Postgres and I came across the following need, I have field "packages" in one in the table "flow", where I need to separate the packages by quantity of…
-
1
votes2
answers121
viewsSQL Update from another tab
Hello, I’m trying to update the product table using the average unit values of one year in the document table (where the notes enter) and the q instruction I’m using returns with error: UPDATE…
-
1
votes1
answer66
viewsDoubt select with Where in SQL Server!
Hello! I have table relations up. I need to develop a return select: Cars, from the same manufacturer and model, which are put up for sale by more than one dealer. I arrived at the following code:…
-
1
votes0
answers27
viewsI need to put an ID in the print file using C# and Itextsharp
Edit: if anyone has the same problem as me, I solved by playing the " Pdfptable ID = new Pdfptable(1)" out to be a global var and put the "pdfdoc.add(ID)" part out of the while So, for my work, I…
-
1
votes0
answers261
viewsDisplay result of a query in an HTML tab. NODE.JS/SQL SERVER
Hello, I need urgent help. I made a connection to the sql server database via Node.js Only to know the amount of items you have in the table (Count). I would like to show this quantity result in a…
-
1
votes1
answer84
viewsSeparate Columns in SQL Row Numbers
to with a problem for SQL Server. I have an event and value table and I make a Join with another table that has several columns, the amount can be marked as 1 for active and 0 inactive. As you can…
-
1
votes1
answer117
viewsHow to extract a word from a string (SQL Server)
I’m having a problem with my script. Context: I need to get information from a string that is in the nm_content column, but all the functions I try are not working. I tried to do it separately and…
-
1
votes0
answers143
viewsSql Server Database Connection Error
I am developing a Webservice in Visual Studio 2019 Community accessing the database in SQL Server through ADO. I am using "SQL Server Management Studio v18.6". When I open the database appears the…
-
1
votes1
answer54
viewsSQL - Group information and Do not repeat
I’m doing an SQL where I need to show the purchase orders. However a purchase order, can have several quotations and do not want to keep repeating the quotations, I want to bring me the quotation…
-
1
votes2
answers74
viewsData Conversion in SQL server 2008
Hello! I need to do a data conversion in SQL Server 2008 from the "data field". Could someone tell me how this can be done? I tried so: select distinct c.Empresa, p.Nome,…
-
1
votes2
answers147
viewsquery in PHP is empty but in SQL Server it works
Good afternoon, I have a procedure to run on sql server, if I run directly on SQL it runs normally, returning me the expected line as in the image below: but when I run codeIgniter 3 (php) it…
-
1
votes1
answer51
viewsAdd separate lines of a child table with values of a parent table without duplicating the values of the parent table
There is a SALE table that generated 2 records in the DOCUMENT table I needed to show the total sum of value fields of these two lines (showing row by row), but they need to add with some value…
-
1
votes1
answer69
viewsHow to treat a field in SQL SERVER
I have two tables in SQL one of EMPLOYEE and another of Dependents and I need to bring the name of all employees, regardless of whether or not they have dependents and for those who have, I need to…
-
1
votes0
answers263
viewsBulk C# and Sql Server NFE xml import
Good morning! I have an application with the following features: Windows Forms, C# Visual Studio Community 2019 Sql Server Express Windows 10 Pro About: I created the application in order to import…
-
1
votes1
answer63
viewsSQL doubt in query
Can someone give me some guidance in this consultation? How to find out how many possible shows watched? For viewers of the day "24/07/2020" who passed the turnstile before the opening time of the…
-
1
votes2
answers141
viewsProcedure with CASE in the WHERE clause
Well my doubt is this, I’m beginner in sql serves, i am running a trial and in it using the CASE method the following code shows what I am doing: ALTER PROCEDURE [dbo].[STP_S_Cliente_Busca]( @Busca…
-
1
votes1
answer103
viewsHow to search for data from one column in another column in SAS using Proc-SQL?
I need to perform a query in which I have to do a Join between two Tables. The column I should use to do the "On" of Join is the CPF/CNPJ. However, table A’s CNPJ data is only with 12 numbers, while…
-
1
votes1
answer36
viewsHow do I make a Total Current?
I have a Query made that takes all the invoices of a specific client and it appears all the payment information and current balance, as shown in the excel image: Img1 The idea is to add the missing…
-
1
votes1
answer32
viewsRecover Milliseconds of a date recorded in an MSSQL Server 2019 BD with VB.Net + ADO.Net
I would like to know how to recover a date as given from the recorded Milliseconds in a MS SQL Server 2019 database using VB.Net + ADO.Net. Whenever I try to rescue the date, comes in the fomrmato…
-
1
votes1
answer46
viewsError publishing Power BI report on Workspace
Good afternoon I have the following structure mounted on my personal machine: SQL Server -> Server Analysis service -> Power BI -> Power BI report published on the Web. Everything works…
-
1
votes0
answers140
viewsDBCC CHECKDB Cannot continue the Execution because the Session is in the Kill state
In our current database scenario, we have two databases A main database: BANCO01 And a BANCO01 dependency database used for testing: BANCO02 After running the database integrity check script. DBCC…
-
1
votes2
answers37
viewsEntity Framework -> How to find the largest table elements
I have the following tables in my base: Produto Id | Nome | Preco 1 | fone | 100 2 | copo | 50 3 | pao | 10 ProdutoStatus IdProduto | Versao | Preco 1 | 1 | 101 1 | 2 | 110 1 | 3 | 90 2 | 1 | 55 2 |…
sql-server .net entity-framework asp.net-core entity-framework-6asked 3 years, 9 months ago Guilherme Golfetto 743 -
1
votes0
answers37
viewsHow, after a POST request, to insert values into another table automatically with the Entity Framework
Good night! I have the following question: I have 3 tables (Students, Etapasala, Classroom) As you can see, Etapasala is a connecting table between the student and the classroom. I’m using the MVC…
-
1
votes1
answer22
viewsAdding Amount of Input per month and customer
Hi, I can’t add up the amount of incoming products per customer per month. Can anyone help me with any tips? I’m getting the following result: MÊS Quantidade 1 95 1 55 2 90 3 140 3 40 3 95 3 40…
-
1
votes0
answers38
viewsAlways Encrypted: How to insert in encrypted column?
First I tried it: DECLARE @test varchar(50) = 'test' insert into Customer values ('Lucas', 'Test', @test) But you made that mistake: Encryption scheme mismatch for columns/variables '@test'. The…
-
1
votes2
answers90
viewsI need to create a report that sums up values by category and groups this information according to origin
I need to create a report that sums up values by category and groups that information according to origin. I explain: I need to bring the sum of monthly fees, enrollment, material and fees, but…
-
1
votes0
answers18
viewsError connecting to Entity Framework in an existing BD
I created an application that uses Entity Framework 6X and Code First mode by Fluent API, Map Classes, using classes from my model , and creating the context class. When I try to connect to see if…
-
1
votes1
answer25
viewsSqlserver Field Identity jumps to 1001
I noticed that one of the tables had a balance from 9 to 1001. At first I imagined that some colleague would have done a test in the bank and deleted the record in sequence causing the number to…
-
0
votes2
answers2742
viewsHow to Migrate SQL Server Database to Oracle
I created a diagram on sql-server, where it automatically creates the entire database structure, only that I will have to migrate to Oracle. I can migrate the whole structure (tables, Fks, Pks,…
-
0
votes1
answer124
viewsBatch calling "dtsx" does not connect to Avaya CMS
I created a service in dtsx that needs to connect to CMS Avaya. It turns out that when I run it through Visual Studio it follows the process until the end normally. But when I call one batch it does…
-
0
votes1
answer213
viewsCan I add content tables in the same database as Users? ASP.Net Identity
I created an ASP.Net MVC 5, EF 6 project with individual accounts. The database is automatically generated with 5 tables: Aspnetroles Aspnetuserclaim Aspnetuserlogins Aspnetuserroles Aspnetusers Is…
-
0
votes1
answer840
viewsCalling Function or Procedure Multiple Times
How to create a Function or Procedure that calls another Procedure to perform a neighborhood exchange on my ERP system? Below is the precedent I want to define values for its parameters. It should…
-
0
votes1
answer5609
viewsSQL SERVER connection string for classic Asp
How do I create a connection string for CLASSIC ASP to connect to the Microsoft SQL Server database
-
0
votes2
answers723
viewsSQL SERVER and Active Directory integration
Hello, I wonder if it is possible to make the Active Directory authentication point to a base in SQL Server, where I have user and passwords. The point is that I have a user base and that all…
-
0
votes1
answer351
viewsChange language in the database during a query
Is it possible to change the language of the database only during the execution of an insertion query? I am having problems with date conversion due to the formation of them, the Bank expects…
-
0
votes2
answers306
viewsForeign Key error when deleting a record
I have a table with products and another one with the category of this product. In the category table I have a detailsView with a delete button, and it deletes when a category is not associated with…
-
0
votes1
answer374
viewsError using sql Insert(SQL Server) command, via classic ASP
Good evening, I have a problem running an sql command through an ASP application. This is the command: strSql = " INSERT INTO movimento_tef_nsu ( "&_ " identificador "&_ " ,nsu_sitef "&_…
-
0
votes2
answers788
viewsregistering php data in SQL server database 2008
I have a question... I don’t know if I’m putting the Cód right, I’m a beginner in php and I need a help... I already managed to make the form I have to write in Mysql ... but now I’m working on an…
-
0
votes2
answers155
viewsHow to check WHERE clause with apostrophe in a DELETE operation?
I need to delete a record, however, in the WHERE clause one of the data has apostrophe. How can I verify this information, because it is obvious that will give error. DELETE FROM IES WHERE…
-
0
votes2
answers2020
viewsRAD Studio XE6 does not connect to any database!
Program used: RAD Studio XE6 (32bits). Problem: When creating a new Desktop or Mobile project, when trying to configure the connection to any database, whether by Firedac or dbExpress, the following…
-
0
votes1
answer166
viewsSql CE 3.5: Data generation probelma
When trying to generate Datacontext to a Windowsphone 8.1 project, through the SQL Server Compact Toolbox interface: -Generate Code (EF/LINQ to SQL/Syncfx) >> Add Windows Phone Datacontext to…