|
|
|
|
|
|
|
|
Question of the Day |
Today's question (by Steve Jones - SSC Editor): | |
Going from long to wide | |
I have a dataframe of speakers and events across years.
> speaking <- data.frame(ID = 1:3, expand.grid(Name = c("Steve", "Grant", "Kendra"), Year = 2015:2017), + Events = round(runif(9, 18, 35), 0) + )I have the tidyverse library loaded and want to use the wide() command to change my dataframe. I run this. > widespeaking = speaking %>% spread(Year,Events)What size and shape of dataframe does this give me? | |
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) |
Multi column histograms In SQL Server 2017, if I create an index with 4 columns, the data from how many columns is used in the statistics histogram? Answer: 1 Explanation: The statistics histogram in SQL Server only uses the data from a single column. Ref: Statistics - https://docs.microsoft.com/en-us/sql/relational-databases/statistics/statistics?view=sql-server-2017 |
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 |
Existing logins get mapped to new databases - Pretty new with SQL but working my may up:-) When I create a new database all existing SQL-logins automatically get mapped to the new database. How to avoid that? I can remove them afterwards but since I'm about to add 60+ databases I will be a pain in the ass to remove them manually or […] |
Grant permissions to execute jobs owned by user - Hey gurus, I'm novice to SQL Server and in need of your help! I need to create a SQL Login for use by few people to run jobs created by 'xyz' account. Is there an easy way to do this? I don't want to add them to the SQL Agent roles in MSDB as I […] |
SQL Server 2016 - Administration |
SSMS connection attempt results in "Errors in the metadata manager. ..." - Hello experts, I have a colleague who's trying to connect to one of our dev database servers, and when they launch SQL Server Management Studio, they see this error after clicking connect: Errors in the metadata manager. Either the trace with the ID of 'MicrosoftProfilerTrace156...' does not exist in the server with the ID of […] |
Db went to suspect in AG - One of my db went to suspect in secondary replica when i checked in events lock_redo_blocked , how can i trouble shoot these issue . In sql Logs we find deadlock info at that time |
Query to check the latest windows patch detaisl and last reboot - i need a query to check the latest windows patch details and last reboot of the server .any one help ? Thanks |
Geography methods causing syntax error in job - So...I'm trying to work with some geography in a job step. The entire step runs fine in the query window, but when put into the job the step fails. Here are a few examples from the job...does anything jump out? SET @point = (select "geo" FROM "objectLocation" where "objectId" = @objectId).MakeValid() SET @objarea = (select […] |
Administration - SQL Server 2014 |
Non-yielding scheduler error in SQL-2014 with SP-3 - Every once in a while we receive a "non-yielding scheduler" error in SQL Server 2014. We already upgraded to SP-3 which is suppose to resolve this issue. What exactly this error means? SQL Server doesn't crash immediately, but natively compiled stored procedures start faltering about 1-2 days following this error. What should be done to […] |
AG secondary TEMPDB growing hugely - Hi, We configured the Alwayson on 3 servers. A -primary(Synchronous),B-Secondary-(Async-Readable),C-Secondary(Asyn-Not readable).Fail over mode is Manual. from 2 days the secondary server tempdb is growing hugely. When we checked the Primary server the tempdb is fine.Not growing. i am not able to understand why secondary server tempdb is growing hugely. Yesterday night we restarted the Secondary […] |
SQL Server 2012 - T-SQL |
Convert smallint to Date - Hello! I have column in SQL 2012 DB of datatype smallint. Could you please let me know how to convert smallint to date? Here's the example of smallint data "12940". Thanks. |
TempDB filling up - Hello all, We have a SQL Server 2012 Enterprise SP1 running our ERP system. We have 15 production databases with approx 570GB in size. Our Tempdb has an initial size of 100GB and sits on a 450GB drive. Every day it seems to grow in size until all 450GB is consumed in approx. 2-3 weeks. […] |
SQL Server 2008 - General |
Remove SQL Server from Failover Cluster - Hi, I'm having a problem with a Windows Server 2008 R2 Failover Cluster with a SQL Server 2008 Instance losing connection to the shared storage disks. It's an all flash netapp san which has been working fine. To solve I was thinking about removing the SQL Instance from the failover cluster and just running the […] |
T-SQL (SS2K8) |
Upsert operation between servers - Hello Everyone, We need to perform UpSert operation between multiple tables belongs to different server , can you please suggest any Technical design for this. Suppose a consultant made some changes in UAT at some point of time then later he wants to migrate same in Production. It may be a new records , updated […] |
SQL Azure - Administration |
Managed Instance Error Creating Recurring Schedule - BUG??? - When we try to create a SQL Server Agent job schedule that has a recurring frequency type we get the following error: SQL Server Agent feature Schedule job ONIDLE is not supported in SQL Database Managed Instance. Review the documentation for supported options. If we click ok to the message and then edit the unsaved […] |
SSRS 2014 |
Page can't be displayed while accessing the Report server in other Computer - I have set up a Report Server in a Windows 10 client, everything is fine when you try to access it locally, but when I try to access it using another computer, "This page can't be displayed" is the only result that I get. I can ping the computer where the report server is installed, […] |
SQLServerCentral.com Website Issues |
Unable to subscribe to newsletter using the email entered - I am one of those users that have not received a newsletter since the new site went active. Can you please reset my email to be OK? Thanks. |
| |
©2019 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved. webmaster@sqlservercentral.com |