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
votes0
answers16
viewsSQL Server 1639 Installation Error
I went to login for the first time on the server and had an authentication error, uninstalled and went to try to install it again, only now it does not install the program. The Sqlserver process…
-
-1
votes1
answer29
viewsSQL Server - Function to format date field with Convert command
I have the following function: select convert(DATE,GETDATE(),101) Where she returns to me as follows: 2021-08-17 I want him to return me a data with this format "17/8/2021" keeping the data as date.…
-
-1
votes1
answer452
viewsC#hash encryption
I was able to create a registration with an encrypted password, but in the access method (login) I have doubts on how to take the password typed and compare with the password registered with…
-
-1
votes1
answer32
viewsApplication without access to the Database after publication in Azure
I published an Asp.Net Core 2.1 application in Azure, I made the Migrations, the database and tables were created normally, I can see the whole structure of the database by VS, but the application…
-
-1
votes1
answer742
viewsNODE.JS 'Connectionerror with MSSQL
It’s the first time I’ve worked with javascript and Node.js. I have no idea what the error might be or how to make the connection, my problem initially arose here:…
-
-1
votes2
answers51
viewsSearch for elements with a certain distance of time (informing only time)
Detail sqlserver(2008) Good evening, I have the following problem. I tried to search all day and found nothing. -I need to search for elements in the same table that have the same date (day, time…
-
-1
votes1
answer39
viewsTrigger SQL Server
I have this Trigger in Postgresql and I’m having a hard time turning it into SQL Server. -- Trigger -- CREATE TRIGGER livro_original BEFORE INSERT ON tabela FOR EACH ROW EXECUTE PROCEDURE…
-
-1
votes2
answers56
viewsUpdate quantity in a table with sql server and c#
I have a datagridview that is filled as soon as I choose the items that in the case are products that contain quantity in the product insert I choose a quantity and add the item to datagridview,…
-
-1
votes1
answer98
viewsGo to the next row of a table with while. Is it possible?
I wonder if without a cursor, I have how to scroll through a table within a While. Example, I have this block: SET @CONT = 0 WHILE @cont < 3 BEGIN EXEC GP_ImprimeConsProdutosTipo ' and…
-
-1
votes1
answer98
viewsDoubt - Relationship N to N
I’m developing a conceptual model for project management. A Project can have several phases. One Phase can be in several projects. The above relations will generate another table "Projectophase" .…
-
-1
votes2
answers73
viewsCalculating balance and separation by currency
I am in need of help to do a function that I can know the balance of customers' invoices and that the value is separated by coins of invoices (for example 250 USD | 340 EUR) because there are…
-
-1
votes1
answer49
viewsShow only 1 secondary table record along with primary table on cursor
I have a cursor where it brings me data of a request (mother table) and the order items in xml(daughter table) currently the cursor brings request by request with fetch next, but the daughter table…
-
-1
votes1
answer57
viewsI need to change a table data with information from a different table
I have 2 tables I need that whenever a consultation is made or inves to show the tagname in Table 2 the data in the column mask and whenever a new tagname it already updates to mask Follows the…
-
-1
votes1
answer696
viewsSQL SERVER COLLATION PROBLEM
Someone can help with this Union of tables with Collates, I searched in Google and did not understand very well. error : Cannot resolve the collation Conflict between…
sql-serverasked 5 years, 1 month ago Brian Lucas 24 -
-1
votes1
answer89
viewsNodejs + mssql how to do a search sequence
I’m starting with nodejs and I came across a problem that I’ve been a few days resisting not posting here, but it seems I don’t have enough knowledge and I can’t find material when searching for…
-
-1
votes1
answer36
viewsMerge results from 2 Select with no different fields
Good morning, I have a question about creating a query where the second select has only one field and this field has to appear in the first select. the relationship data between the tables are:…
sql-serverasked 4 years, 8 months ago Wanderson Fernandes 1 -
-1
votes1
answer125
viewsReturn records according to percentage in sql server
Good night, I need to make a select that returns only the records that were paid more than 60% of the installments. I created a table with the following structure: CREATE TABLE PARCELAS( IDPARCELAS…
-
-1
votes1
answer51
viewsBring result in a row to Join between tables with 1:N relationship
I have the following problem in SQL Server I have the tables CLIENTE and TELEFONE, with a relationship of 1:N among them: CREATE TABLE CLIENTE( CPF CHAR(11) NOT NULL PRIMARY KEY , NOME VARCHAR(500)…
-
-1
votes1
answer1642
viewsLimit decimal places - SQL Server
Opaa! I made a select of a table that returns the value of a book with a percentage of adjustment, both negative and positive. But it is returning me a value with several decimal places, and I would…
-
-1
votes1
answer29
viewsAzure connection - SQL Server 2005
I’ve been trying to connect on the Microsoft Azure database server to an application encoded in . Net Framework that is running on a windows server 2003. The problem is that only this server is…
-
-1
votes1
answer250
viewsSearch log by Cpf ASP . NET CORE 3.0
I created a simple CRUD using ASP . NET CORE 3.0 using EF. All basic CRUD operations are running normal. I tried to create a method manually to search a record by the client’s CPF as code below, but…
-
-1
votes1
answer27
viewsuse two merges Matched then on sql server server
I’d like to know how to use the second merge I need the following case, knowing that the source is a log, will not happen the "WHEN NOT MATCHED BY SOURCE THEN" MERGE tabelaTarget AS target USING…
-
-1
votes1
answer188
viewsHow to not add zeroed values - SQL
I have several columns and some of them are practically zeroed, like every 100 rows have a value. I’m adding these columns with SUM(column1), SUM(column2)... but when adding up these columns I don’t…
-
-1
votes1
answer38
viewsHow to update a select with sub queries that contain Group by and order by
Physical Table Registro IDBanco DataMovimento Credito Debito SaldoAtual Ordenado 1 26 2020-07-05 500,00 0,00 0,00 5 2 26 2020-07-03 0,00 10,00 0,00 3 3 26 2020-07-06 0,00 20,00 0,00 6 4 26…
-
-1
votes2
answers79
viewsSQL Do not display rows from a duplicate column
Hello guys I’m having a hard time not displaying the items of a duplicate column, in case the column C.CLI_ID, I need to show only the first result. I’ve tried several ways but SQL is not my…
-
-1
votes1
answer48
viewsDisplaying SQL Server data in Windows Forms
I am wanting to display the information of certain person I am looking for in the SQL Server Database on a label in Windows Forms, but when I run the code it displays…
-
-1
votes1
answer22
viewsError connecting to database via Seriate Node JS
When I connect to my database locally it works normally. But when I deploy to Heroku returns me the following error: Request Error: No connection is specified for that request My configuration…
-
-1
votes1
answer119
viewsError 1776, Level 16
I am creating a bank and this showing this error when I will create the table discipline, where I want to make a Constraint with the table Coordinator. Message 1776, Level 16, Status 0, Line 56…
sql-serverasked 4 years, 2 months ago danilo_balbo 1 -
-1
votes1
answer31
viewsdoubt max sql
I have a question about sql, to with a query that I want to bring the most recent answer of an object, only that is always coming the history, I tried sub query, and etc, max, but it did not work,…
-
-1
votes1
answer28
viewsQuestions with COUNT/GROUP BY
Good afternoon, I’m having trouble with the group by clause. I have a gigantic query, I need to quantify the contracts by Id, showing the degree of impact. Then I gave a Count(Id). The problem is…
-
-1
votes1
answer48
viewsMake INNER JOIN with more than one table
I want to relate Inner Join in the Employee table with Address, And department and function but only that the function table is foreign key in the department table. INNER JOIN no C# SqlDataAdapter…
-
-1
votes1
answer53
viewsInsert values x into table A if exist on table B
I want to Insert in table A of the key field, but only if this key already exists in table B Example Insert key(123) in table B if there is key(123) in table a (am using sql procedures managemente…
-
-1
votes1
answer26
viewsHow to make an SQL Server table read UTF8 text correctly
I have a query in which I need to do the column Name read UTF8 codes. Here’s the code here: SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO SET ANSI_PADDING ON GO CREATE TABLE [dbo].[MonsterList](…
sql-serverasked 3 years, 7 months ago Thiago Furtado 1 -
-1
votes2
answers52
viewsDelete all items that have at least one Null value
I am needing to do a query that DOES NOT return the Ids of contracts that have ANY installments like Null, in the example below I need it to return empty, because the ID contract 666666 has at least…
-
-1
votes0
answers31
viewsInsert with PHP in SQL SERVER
Through the POST method I am sending the form data. However at the time of the insert INT type fields in the database give the following error: "sqlsrv_rows_affected() expects Parameter 1 to be…
-
-1
votes0
answers13
viewsShared Preferences does not work
I’m making an application where in the database makes a summation, along with an innerjoin After running this selection, I want it to save the values in a Shared preferences. But always when I try…
-
-1
votes0
answers12
viewsHow to make an oracle creation function to insert data into the table?
someone could give me a hint, as it transforms this function table Valued functions, from mssql, to oracle! Parameter entry is ini month, ini year, end month, end year And returns year, month and a…
-
-1
votes1
answer19
viewsHow to make a query using SELECT with conditions of LIKE '%' and Equal "=" with input of textbox and dropdowlist in C# ASP.NET
I am doing a query of people by filter, but I have come across the following problems: 1º LIKE Condition %%, (because the user will not always fill the fields "Document Number" and "Name" -…
-
-1
votes0
answers23
viewsHow to group specific data
I made a precedent in which I am trying to group the items with the same id_request, but the answer I get at the time of running is, each separate product, even though it still has the same id.…
-
-2
votes2
answers394
viewsUpdating field datetime sqlsrv
I need to update the date in the date field, type datetime, in a table, taking today’s date, for example. I’m trying to do it this way: $dataHoje = new DateTime(); $sql = "UPDATE…
-
-2
votes2
answers77
viewsDoubt of relationship of tables
Good morning I would like a help of how do I get two information on one table from another. example I have a table of notes where I have the Id_agent and the Id_address, I want to get the agent name…
sql-serverasked 8 years, 11 months ago Ronie 1 -
-2
votes1
answer79
viewsCreate Table in SQL Server 2008
There is possibility to create a table of CAIXA that, for example, when placing the CODIGO of the product, pull the DESCRIÇÃO automatic, being in the table of PRODUTOS??…
-
-2
votes2
answers90
viewsDoubt with cast sql server 2008
I have a sql query is want to bring the PRECO_LIQUIDO information formatted as decimal using a cast decimal (12, 2) How could it be done, thank you select --calculo do desconto individual…
sql-serverasked 8 years, 9 months ago Harry 3,805 -
-2
votes1
answer38
viewsCannot find the Interop type that Matches the Embedded
type 'Microsoft.Office.Interop.Excel.Application'. Are you Missing an Assembly Reference? FileCopy("\\Thulller\Sistema\ModeloAbertaFechada.xls", "\\Thulller\Sistema\Financeiro\" + txtNomeDoc.Text +…
sql-serverasked 8 years, 4 months ago Guilherme 3 -
-2
votes1
answer345
viewsHow to create a shopping cart in ASP.NET MVC
Good night! I am doing a project in ASP.NET MVC and I really need to create a shopping cart to receive all the items that the user click to add to the cart, for example the product will be on the…
-
-2
votes1
answer140
viewsField write float to sql server with c#
Good morning, I’m doing an update in a float field on sql server, but I’m not getting this from a conversion error, I tried several ways and did not succeed, I keep getting this error return = Error…
-
-2
votes1
answer477
viewsError when entering monetary value into bank
I am trying to save the value 137421,20 in a table of Sqlserver with a field of type Numeric(8,2). However I get an error with the description: "Parameter value 137421,20 is out of range." I’m…
-
-2
votes1
answer881
viewsRead data from a column through C#
I have a postcode and divided into 2 variables: the first, where the first 4 numbers appear and the second where the last 3 appear. Ex.: 4300-234 - first = 4300; second = 234. I have a table in the…
-
-2
votes1
answer226
viewsC# - Pass only numbers in a field formatted for currency
I have an application that presents me in a textbox the value of a course enrollment: string mensalidade = string.Format("{0:C}", Convert.ToDouble(leitura["Mensalidade"]));…
-
-2
votes1
answer340
viewsPulling data from SQL Server using PHP
Hello folks using PHP code below I can insert rows in my SQL Server table: sqlsrv_query( $conn, "INSERT INTO usuarios (login, senha) VALUES ('new', 'mano')"); However, I would like to return some…