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
-
0
votes1
answer328
viewsSelect with multiple Left Joins
I performed a LEFT JOIN considering as attributes (CPF, TEL1, TEL2 and TEL3). Why all these? Why the field CPF often returns zeroed in one of the bases, so I’m considering the phone fields as well.…
-
0
votes1
answer307
viewsPHP Slow - Code or Hosting?
I am having frequent problems with PHP, perhaps because I am creating in a "simple" way, or it would be my hosting that is basic? Use of Locaweb’s Hosting I plan. I am creating a system that will…
-
0
votes0
answers415
viewsInterrogation instead of C# and SQL Server accentuation
Good afternoon guys, I have a C# application with SQL Server database, the problem is that words that have accented letters, in place of these letters appear lozenges with a question mark in the…
-
0
votes0
answers29
viewsHelp with sql server and android dats
I have this code to do a search to SQL Server database but give me error: Incorrect syntax next to '19' Here’s the search code: SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd…
-
0
votes1
answer384
viewsFunction regex blank spaces SQL Server 2008
Hello, Within a specific table in my DB, I have certain fields that were registered by someone else (users), so some fields instead of having a single space ' ', has spaces of the most diverse…
-
0
votes1
answer100
viewsSQL query is not grouping
I’m new in SQL and I’m trying to group the data as query below, however, is not grouping. The correct one was to leave, for example select left(P.ProjDesc,6), COUNT(P.ProjID) from Projetos P where…
-
0
votes3
answers737
viewsField comparison problem with date and time
I have a query where I noticed that one of the fields used in the comparison brings date and time, being compared with the current date of the day without time, this can cause problems in the return…
sql-serverasked 7 years, 11 months ago Harry 3,805 -
0
votes1
answer174
viewsQuery with sql query using time interval
I have a Job in sql server that runs twice a day, 06:00 and 18:00, it has an sql query where I take the date of the process and compare with the date of the day. It turns out that if you have a new…
sql-serverasked 7 years, 11 months ago Harry 3,805 -
0
votes2
answers4550
viewsConversion from VARCHAR to SMALLDATETIME
SELECT DISTINCT p.codInterno, CASE WHEN f.idFabricante IS NULL THEN 99999999999999 ELSE f.idFabricante END AS fabri, '0', p.descResumida, p.descProduto, p.descProduto, p.codElemento, GETDATE(),…
sql-serverasked 7 years, 11 months ago Harry 3,805 -
0
votes1
answer494
viewsDoubt - Query (Do not bring a particular record)
Good afternoon Galera! Next, below is a query where it was to bring all the calls that has the description ''Block Client - Delinquent' and with id = 572 (blocked clients), however, this query has…
-
0
votes1
answer252
viewsIncreasing column sorting, but per result row
I have the following table structure and results: I need to create an efficient instruction able to sort the values in ascending form, but they should be sorted by column/row and not only by column.…
-
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
answer1265
viewsConfigure sql server without instance
Use SQL Management Studio to execute queries and the installation has been configured to use with INSTANCE. How do I remove this instance from the configuration or use a pattern? The instance I have…
sql-serverasked 7 years, 3 months ago Guilherme Nass 939 -
0
votes2
answers2406
viewsSingle row and column result for multi-row column
I have a function in SQL that returns a single row in a single column with records separated by points. Example: Column 1: Result Line 1: 0000000.0000001.0000002.0000003.0000004.0000005.0000006 I…
-
0
votes0
answers492
viewsHow to recover the id entered in the sqlserver database using Delphi datasnap
How to get the id that has just been inserted into the bank on the server side, use Delphi XE10.1 Sqlserver Bank and Firedac, I would like to take the id to use in the child table when it is master…
-
0
votes2
answers154
viewsHow to remove Duplicate dates in sql?
Good morning, I need some help for the following problem, I have this code Which gives me the following result, but I’d like to remove the duplicate dates From now on, thank you.…
-
0
votes1
answer29
viewsGet Timestamp from Sqlserver
I really wanted to get the TimeStamp from the Sqlserver database, but I’m not getting it, follow my example: Connection connUpdate = DriverManager.getConnection(ConnectionURL); PreparedStatement…
-
0
votes0
answers338
viewsRestoring sql server management studio database
I’m creating a developmental environment. I went into production environment I opened sql server management studio right click on tasks database > backup I’m back in the development environment I…
-
0
votes1
answer844
viewsWhy does this query not work on Oracle?
I am translating a query from SQL Server to Oracle and found an error that makes no sense and I am unable to fix. The error shown is as follows:: ORA-00904: "ITM"."NRO_INT_ITEM": identificador…
-
0
votes2
answers64
viewsDoubt - SQL Server Query
As I do in sql server to get the records larger than 10 days from the current date, that is, in the current month, I want to get all the records prior to day 01-08. I tried that way, but you didn’t…
-
0
votes2
answers98
viewsMS SQL server Storeprocedure returning resultset
I am new to SQL server and I need to create an SP that does the processing of certain tables and save changes and after giving me the result of these changes as a table-value Function for PHP. tried…
-
0
votes0
answers273
viewsFaster API REST - PHP
Good morning Stack overflow!! Next, I’m doing an integration with my bank Sql server of an APIRest, where I pass the information I want in the URL and receive the content as json, however, I perform…
-
0
votes0
answers37
viewsFulltextsearch in SQL Server
Hello! All right? I need to make an appointment with fulltextsearch, because it needs to be indexed. However, I am not managing to assemble a query that returns all the possibilities, as if it were…
-
0
votes3
answers1584
viewsMerge the result of a query on the same line from the sequential
I have the following appointment: SELECT * FROM SERQUENCIAL WHERE DATA BETWEEN '2017-01-01' AND '2017-01-19' She returns: +--------------+-------+------------+-----------------------+ | ID_PESS NOME…
-
0
votes0
answers72
viewsconnect Microsoft SQL Server Management Studio with Dreamweaver
I have a server on my computer, Xampp and it’s working OK. My question is: how do I link SQL Server to my html or PHP document? I use Dreamweaver, it’s the same process to connect the test server or…
-
0
votes2
answers473
viewscolumn with invalid accent
I’m assembling a report using the database of a system and PHP with DBLIB, however, who structured the database created the tables and fields accentuated. When I go to make a query in some field…
-
0
votes1
answer2104
viewsSQL Recovery Mode Database
Good afternoon, A database this with status "In Recovery". While trying to parse the error log through this dbcc checkdb command, returns the following error message. Database is beeing recovered.…
sql-serverasked 7 years, 10 months ago Otavio Camargo 361 -
0
votes1
answer1383
viewsHow to perform only 1 specific table Restore in SQL Server 2012
Good afternoon! Guys, I have a situation: I have a backup of the database and the server has already been created a database with this base called test, however, I need to migrate a specific table…
-
0
votes0
answers318
viewsEncrypt Codeigniter database
good night. I took the boat riding here at the company I joined to continue a system for a company, in Codeigniter connected with a Sqlserver database. My knowledge of Sqlserver and servers is…
-
0
votes0
answers27
viewsUnusually large space occupation
Ambience: Windows Server 2008 (A: x64, B: x86) SQL Server 2008R2 on both. The second column is the number of rows, the third column is the space occupied in KB. Does anyone have any idea what might…
sql-serverasked 7 years, 2 months ago Nuno Nóbrega Batista 1 -
0
votes1
answer373
viewsI need to display a TOTAL field in a PIVOT query
I have the query below that returns the total quantity in stock of the products for each city. Each city is a column and products are displayed in rows. Now I need to display in a field (column) the…
-
0
votes1
answer466
viewsSubtract Saturdays, Sundays and specific dates from another table
Good afternoon, I have a table: national holidays id date doubt I have a table: holidays (loose ends and amendments) id date description in another table: obligation (where through a date informed…
sql-serverasked 7 years, 9 months ago Bruno Coca Medina 3 -
0
votes1
answer167
viewsSql server 2016 Developer x 64 Setup.exe Error
I downloaded the ISO file from SQL Server, mounted and at the time of clicking setup.exe this error happens. Can someone help me? I need to install SQL Server to use together with visual studio. FA…
-
0
votes2
answers41
viewsConnect to SQL with Appconfig
How can I connect to SQL with connectionstring in Appconfig? I did so, but I wish it could be for Appconfig, how can I do? private void button1_Click(object sender, EventArgs e) { string…
-
0
votes1
answer405
viewsDELETE in SQL does not run
I’m trying to delete lines from an SQL Express database, but unfortunately I can’t do it. The query is one of those really basic, but after running it I get the message from 'executing query' in SQL…
-
0
votes1
answer182
viewsChange Primarykey Entityframework
How to change a Primary key using Entityframework? I have a table with simple PK and need to change this PK by Entityframework.
-
0
votes1
answer70
viewsReceive parameter and depending on the value run a specific process
I have a system in Classic Asp, and I need to run a specific SQL Server process, according to a parameter that the system receives from a form. I tried to do so: if tipoagenda = 1 then ssql1 = "exec…
-
0
votes2
answers219
viewsService to pick up a change in the bank
Here’s what I need. As I do for a service to auto startar whenever the flag of the bank changes from 0 leg 1. I have a field in a table in the BD(Sql Server), that every time the seller request a…
-
0
votes1
answer1002
viewsImport decimal with comma
On SQL Server, I’m trying to run a SELECT in a *.csv file as follows: SELECT * FROM OPENROWSET(BULK 'C:\Minha_Pasta\meu_arquivo.csv', FORMATFILE = 'C:\Minha_Pasta\format.xml') AS Contents…
-
0
votes1
answer3438
viewsMessage "Invalid Object name 'dbo.table' SQL Server with Go Lang
I am trying to use a select in my SQL Server Database that I have in Azure. I’m using the Driver: https://github.com/denisenkom/go-mssqldb. However, a message is returned to me: mssql: Invalid…
-
0
votes0
answers251
viewsPopulate combobox with SQL Server Compact data
I need to fill a combobox with data from a column of SQL Server Compact, the code I have not worked. Class Servidor.cs: public DataTable Load(string sql) { Servidor objSqlCeServerDAL =…
-
0
votes2
answers215
viewsSelection with various differences conditions (SQLSERVER)
I wonder if there is any way to improve this selection: SELECT * FROM table WHERE id <> 15 AND id <> 17 AND id <> 23 ... id <> N I don’t have a certain set interval and the…
-
0
votes1
answer1370
viewsNetwork SQL Database Communication
I have an application working perfectly with the BD in a notebook. But I would like to be able to access this database with my application through another device. So I thought I’d do this network…
-
0
votes1
answer41
viewsSqlserver in repositories
I have to send an application project through a Github repository, I managed to make the application work perfectly front-End, Back-End and LOCAL database, my doubt is: Can I export Sqlserver to a…
-
0
votes1
answer63
viewsDelete Constraint after taking its name
I’m spinning the next query to obtain the name of 2 constraints: select TC.Constraint_Name from information_schema.table_constraints TC inner join information_schema.constraint_column_usage CC on…
-
0
votes2
answers2682
viewsHow to set up XAMPP for Sql Server 2014
Can anyone teach me how to set up XAMPP for Sql Server 2014? I’m in a project that doesn’t allow Mysql (PHPMYADMIN).
-
0
votes1
answer122
viewsProcedure Price Range
I’m trying to create a design that according to the price range takes a different field from the table. Create Procedure BuscaPreco @preco decimal, @faixa1 int, @faixa2 int, @faixa3 int,…
-
0
votes1
answer591
viewsConvert SSIS data from varchar to int
I’m locked into a conversion by SSIS, scenario: I have a CSV file, which I need to import into a table already created in the database, In this table of the database I have a column already…
-
0
votes1
answer91
viewsGroup results in single line according to sequential
I have the following query: SELECT * FROM ARELBATIDATRANSITOVIEW WHERE CHAPA = 1234 AND CODEMP = 1 AND BATIDA IS NOT NULL She takes me back to this way: COD |DATA |BATIDA |ST |SEQ_BAT 1234…
-
0
votes1
answer1088
viewsConnection between two DBMS Sql Server
Is there any way beyond Linked to connect two DBMS ? Problem: I need to use the tables of another bank that is on another server with the SQL SERVER installed. My current server is also SQL Server;…