|
|
|
|
|
|
|
|
Question of the Day |
Today's question (by Steve Jones - SSC Editor): | |
Cleaning the Data frame | |
I am tracking some of my flights in this csv file:
Flight,Origin,Destination,FlightTime UA9,IAH,LHR,"2019-04-30 17:34" UA58,LHR,ORD,"2019-05-01 09:12" UA99,LAX,LHR,! UA25,LHR,IAH, "2019-06-22 07:23"I want to read this into a dataframe in R, but for some of the rows, a missing time is denoted with an exclamation mark. How do I read in this value as a "NA"? | |
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) |
The Executable Synonym I run this code: USE sandbox GO CREATE OR ALTER PROCEDURE dbo.GetDB AS BEGIN SELECT DB_NAME() END This sets up a proc in my database. when I run this, I get "sandbox" as a result. Now I run this code: USE CIDemo GO CREATE SYNONYM dbo.MyDB FOR sandbox.dbo.GetDB GO EXEC dbo.MyDB What is returned? Answer: sandbox Explanation: A synonym just provides a replacement of the object. In this case, when I call the synonym, this is the same as executing EXEC sandbox.dbo.GetDB Which returns sandbox. Ref: Synonyms - https://docs.microsoft.com/en-us/sql/relational-databases/synonyms/synonyms-database-engine?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 |
Suspend-ClusterNode -Drain && move-clusterGroup - Hello everyone , if I proceed to do a suspended from the main node of my cluster Suspend-ClusterNode -Drain Are all resources automatically transferred to the second node or I have to do Move-ClusterGroup thanks |
File Integrity Monitoring system and Database Server - Looking to find if it is a feasible idea to install FIM system on a SQL Server. It is a sensitive and highly transnational system and I dont feel comfortable. For people who do not know what FIM is please read the below link. https://en.wikipedia.org/wiki/File_integrity_monitoring It may end up messing stuff. […] |
SQL Server 2017 - Development |
Data quality improvement - Hi I am exploring ideas of improving data quality in new organisation i joined. The issue is it is not straight forward as to re-write things and improve as there are 100s of dataset we process every weeks. I checked few tables for basic checks and found about 40 tables with duplicates. They are actual […] |
SQL Server 2016 - Administration |
Stored procedure getting results from views that are joining several tables - Hi, We have a stored procedure which is executing during a batch job and it is taking 7 seconds to complete and that batch job runs hours to complete. And I'm seeing this procedure called continuously during the batch job and each RPC:completed is taking 7 seconds and returing same rows Started troubleshooting this procedure […] |
Resulted of SP_Monitor with Packet Erros. - Detected which were sent or received by SQL Server since the SQL Server last started. The number is high. I remember that the number 4 errors by month it´s normal, but in this case show me 90...123. What can I do to solve this problem, please. |
SQL Server 2016 - Development and T-SQL |
trying to get all data to line up - Hello, first, thank you all who helped or took the time to look at my last issue, but now i got 1 more, and its a tough this time for me so my 2 tables are: declare @Employees TAble ( employeeID int, employeename varchar(256), Hoursworked decimal(18,2), PayrollDate date ) insert into @Employees(employeeID,employeename,Hoursworked,PayrollDate) values(1,'bob',3.0,'05/01/2019') insert […] |
SQL 2012 - General |
Three most common mistakes that beginner writers make - Do you know about the three most common mistakes that beginner writers make that cause them a failure? Well, many people might not know about the fact that the foremost reason of writers could not finish writing their book on time is that they edit the book along with writing and instead of taking the […] |
Deny Permissions to Schema Owner (assign read only) and deny to Linked Servers - We are running SQL Server 2012 SP4 EE on Windows Server 2008 R2 Standard. We had a developer who moved to another department. We would like to give the developer 'read only' access to the database before eventually disabling his account. We added the developer to the db_datareader database role. I want to make sure […] |
data file .mdf datetime stamp on windows file system when running DBCC CheckDB - I'm trying to find out what causes the timestamp to change on the data file when running DBCC CheckDB. I have confirmed that auto grow, auto shrink, open, close or a restart did not occur. What exactly would DBCC CheckDB be doing that it would need to change the date timestamp on the data file? |
T-SQL (SS2K8) |
Convert Rows into Columns - Hello All, I'm trying to convert rows in table to columns as per the example i.e create one long string of data for every occurrence of ID column. Could anyone please help in achieving it in best way. /** Build up a Table to work with. **/ DECLARE @T TABLE ( ID INT NOT NULL […] |
Convert Rows into Columns - Hello All, I'm trying to convert rows in table to columns as per the example i.e create one long string of data for every occurrence of ID column. Could anyone please help in achieving it in best way. /** Build up a Table to work with. **/ DECLARE @T TABLE ( ID INT NOT NULL […] |
Reporting Services |
Grouping - Hi, I'm trying to create a report (using a Dynamics 365 Fetch) of all completed bookings grouped by week number, day and account. So far, I've got this: What I want is to group by week number, day name and account so that you expand the week number to reveal a list of accounts with […] |
SSRS 2012 |
SSRS 2012 converting Data field - How do you convert a Data field that is feet to miles on a expression. For instance the name of the field is PipeLen.value |
Analysis Services |
I have a query mdx that where it doesn't filter - I can't find the reason because a query that has in 'with member' an attribute of a dimensio that is key does not filter with where, if I put another attribute that is not key if it works ?. Dimension FE6 FE6 is key (int) FE6b (int) Descripción (character) WITH SET [FILAS] AS EXCEPT([FE6].[FE6].[FE6].members, […] |
Article Discussions by Author |
Making Good Use of SQL Server Auditing - Comments posted to this topic are about the item Making Good Use of SQL Server Auditing. |
| |
©2019 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved. webmaster@sqlservercentral.com |