Top new questions this week:
|
Situation When querying a database with a SELECT statement with a defined set of columns, the results are received in around 21 seconds. If there is an additional asterisk (, *) at the end of the list …
|
Consider the following SQL DECLARE @JSON VARCHAR(max); DECLARE @t AS TABLE( field char(32), len1 int, nfield nchar(32), nlen1 int, vfield varchar(32), vlen1 int ); SET @…
|
When I try to concatenate two columns, of different type, I get the following warning: Type conversion in the expression (CONVERT_IMPLICIT(varchar(41), [TABLE].[COLUMN], 0)) can affect “…
|
Every time you insert, update, or delete data in the base table(s) that the indexed view references, the database engine will automatically update the indexed view to reflect the changes. However, I’m …
|
I’ve researched the topic on the official documentation and other questions, however weeks into it I’m still failing to understand what’s causing deadlocks in my application. It only happens in …
|
I store the employees’ vacations in an SQL table as 2 columns of dates (StartDate : EndDate) along with the vacation type. I can’t figure out the best approach to check for some rules, every time an …
|
Sorry, I can’t think of a more specific title. SQLFiddle here: sqlfiddle.com/#!5/cfed3/1/0 I have a BaseData table Name ParamId NumericValue A 202 30 B 203 69 O 203 50 A 203 70 I 204 2 B …
|
Greatest hits from previous weeks:
|
Which one is the best option to get the identity value I just generated via an insert? What is the impact of these statements in terms of performance? SCOPE_IDENTITY() Aggregate function MAX() …
|
I have a table items (item_id serial, name varchar(10), item_group int) and a table items_ver (id serial, item_id int, name varchar(10), item_group int). Now I want to insert a row into items_ver …
|
I have a table in the name of ips as below: CREATE TABLE `ips` ( `id` int(10) unsigned NOT NULL DEFAULT ‘0’, `begin_ip_num` int(11) unsigned DEFAULT NULL, `end_ip_num` int(11) unsigned DEFAULT …
|
For our application we have a configuration file for connecting to the Oracle database (URL, username, password). The application takes 2-5 minutes to start. If there is something wrong with …
|
I have moved my database from an SQL 2005 to a server with SQL 2008. I am now trying to create an ODBC Data Source. I am using “With SQL Server authentication using a login ID and password …
|
I have a table like this: ID | Val | Kind ———————- 1 | 1337 | 2 2 | 1337 | 1 3 | 3 | 4 4 | 3 | 4 I want to make a SELECT that will return just the …
|
Any suggestions on how to deal with this error: TITLE: Microsoft SQL Server 2017 Setup —————————— The following error has occurred: VS Shell installation has failed with exit …
|
Can you answer these questions?
|
I am trying to find the best way to accomplish the following. Get the beginning customer count, which carries from the previous day Get New Customer count Get the number of Customers who have not …
|
As the question states, there are 3 suspect pages on a database, but when I ran DBCC CHECKDB (DB, REPIAR_REBUILD), after almost 4 hours, it completed with no errors. I know suspect pages might not …
|
My company uses SCCM with a dedicated SQL Server instance that is using version 2016. I noticed that this VM is completely idle for most of the time. I barely see any CPU activity, wait statistics …
|