|
|
|
|
|
|
|
Question of the Day |
Today's question (by Steve Jones - SSC Editor): | |
Using Tempdb | |
Which of these doesn't use tempdb for data storage? | |
Think you know the answer? Click here, and find out if you are right. |
Yesterday's Question of the Day (by Steve Jones - SSC Editor) |
Column Mean in R I have loaded a dataframe in R with this code: > sales <- read.csv2(file="d:\\downloads\\sales_data.csv", sep=",") There are a number of columns in here, one of which is "Profit". I want to get the mean value of this column. What code does this? Answer: mean(sales$Profit) Explanation: The mean() function is used, and we pass in the column in dataframe$column format. Ref: mean() - https://www.tutorialspoint.com/r/r_mean_median_mode.htm |
Database Pros Who Need Your Help |
Here's a few of the new posts today on the forums. To see more, visit the forums. |
SQL Server 2017 - Administration |
SQL 2017 AOAG setup on Standalone servers - I've been trying to setup AlwaysON AG on two standalone default sql instances (SQL 2017 Enterprise Edition - 14.0.1000.169). I've checked, port numbers (1433 and 5022) on both the servers are open and there's no issue with DNS. (Hostname is not more than 15 characters.) Can anyone help me with this error please. Msg 47106, […] |
SQL replication many publishers to 1 subscriber - Hello, I am wondering, have 2 questions in regards to transaction replication... probably best to ask my question with using an example, so I have 4 servers, Server A, B, C, D, and the SQL servers A, B, and C, will be publishers, and Server D I would like to be the distributor and Subscriber, […] |
SQL Server 2016 - Administration |
SP performance tuning, any hints. - How to make the below code faster, does it help by changing updlock to nolock help, or please share if you see anything which can be improved syntax wise, etc? ------------------------------------------------------------------------------------------------- CREATE PROCEDURE [dbo].spTest(@DateToProcess DateTime, @ForceTotalRecalc bit = 0) AS SET XACT_ABORT ON SET NOCOUNT ON DECLARE EffectiveDate DATE DECLARE @LastDateProcessed DATE DECLARE @ThisDate DATE […] |
Who changed the SQL memory - is there a way to know who changed the SQL memory and when |
SQL Server 2016 - Development and T-SQL |
Sort already comma eparted value - Hi, Please help me sort a comma separated column in the database table . Create Table #CommaSeparatedString ( ID INT, Title nvarchar(10), StringValue nvarchar(500) ) INSERT INTO #CommaSeparatedString (ID,Title,StringValue) SELECT 1,'Test1','EUR HQ,EME HQ,KSA HQ,NME HQ' UNION ALL SELECT 2,'Test2','LAN HQ,Colombia,Peru' UNION ALL SELECT 3,'Test3','NAO HQ,Trinidad and Tobago,Bermuda,Guyana,Suriname' SELECT * FROM #CommaSeparatedString -- Desired Result […] |
Import Weather Web-service directly into SQL Server - Folks, I am looking to try and come up with a way to INSERT the Output from this URL directly into a SQL Server Table. I would like to see if it's possible to do this directly from the SQL server as a StoredProcedure or TSQL. https://www.aviationweather.gov/adds/dataserver_current/httpparam?dataSource=metars&requestType=retrieve&format=xml&hoursBeforeNow=3&mostRecent=true&stationString=KCLT |
UTC time to EST time - Hi, The 'TIME_UTC' column is UTC timing. I would like to generate the report for EST timings . But below query gives UTC timings for the last week.I would like to convert it to EST timing. Any suggestions pls. select TIME_UTC from table_name where TIME_UTC BETWEEN cast(GETDATE()-8 as date) AND cast(GETDATE()-1 as date) Thanks. |
SQL Server 2012 - T-SQL |
Sql server index - Hi Experts , I have a job which calls 100 of stored procedure. I have identified the tables which were used in the process and rebuild the fragmented index having average_fragmentation_percentage>25. But the performance of the query degraded after index rebuild operation . Can you guys tell me the possible reasons why this happened. Thanks […] |
Regex question - A developer asked me to run a query based on the following regex: ^[A-Z]{4}[0-9]{4} Which means that he wanted any row where the column in question did not have 4 alpha characters, followed by 4 numeric characters. I last played with regex about 6 years ago, so hunted around and found nothing suitable for T-SQL. […] |
how to check which tsql make increasing the log file size - Hello, We set database log file size to 10GB, however database log file size is increased to 30 GB within one day (weekend day). So we would like to see which user or tsql is making increase log file size to very fast. Is it possible to see which transaction or sql statement is increasing […] |
SQL Server 2019 - Administration |
SET DEADLOCK PRIORITY LOW question - Hey all, Session 1 = entity framework, as of not can't change anything about it Session 2 = stored proc, can control it Session 1 and 2 are deadlocking. I want 1 to be the deadlock victim. If I set 2 to have a deadlock priority LOW, will this cause 1 to be the deadlock […] |
SQL 2017 AOAG setup on Standalone servers - I've been trying to setup AlwaysON AG on two standalone default sql instances (SQL 2017 Enterprise Edition - 14.0.1000.169). I've checked, port numbers (1433 and 5022) on both the servers are open and there's no issue with DNS. (Hostname is not more than 15 characters.) Can anyone help me with this error please. Msg 47106, […] |
Attach and Detach Method vs SQL Manage object method - Hi there, if you want to detach a database you would right click on the DB->Tasks->Detach What are the motivations behind doing this? I suspect if you want to make edits to an existing database and don't want to alter the production environment. What's the difference between attaching (right click on databases -> attach) and […] |
Analysis Services |
Translate Dimension Values (multidimensional) - Hello, is there a method to translate the values of a dimension? Example: dimension called diabetic with an IS_DIABETIC column and two values YES and NO I would like to do a translation in French of the values 'OUI' and 'NON' instead of YES / NO THANKS |
COVID-19 Pandemic |
Daily Coping 8 Jun 2020 - Today’s tip is to re-frame a worry and try to find a positive way to respond. http://voiceofthedba.com/2020/06/08/daily-coping-8-june-2020/ |
| |
©2019 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved. webmaster@sqlservercentral.com |