|
|
|
|
|
|
|
Question of the Day |
Today's question (by Steve Jones - SSC Editor): | |
Finding the SQL Saturday numbers in R | |
I have the following dataframe, with some of the SQL Saturday event numbers for a few cities:
sqlsat <- data.frame(orlando=c(1,4,8,21,49), tampa=c(2,10,32,62,86), jacksonville=c(3,15,38,74,130))If I want to get a list of the event numbers for Tampa, how do I slice this data frame and return a vector? | |
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) |
Choosing Rows or Range If I am using the SUM() function in T-SQL with the OVER() clause, what is the default type of framing? Answer: RANGE Explanation: The default framing type is RANGE. Ref: OVER() clause - https://docs.microsoft.com/sql/t-sql/queries/select-over-clause-transact-sql?view=sql-server-ver15 |
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 - Development |
Generate DDL-Script based on Meta-Data - Hi, we have metadata in a table with this information (Attachment). The task is to generate the CREATE TABLE statements for all Tables - based on these metadata (SQL2016) Simple Create Table like the Example below, with Datatype, null and pk. -> Meta-Data in Attachment. Thanks and best Regards Nicole -- Example for finished […] |
How to insert data to target table when there is no matching and update if has - Good Morning, Can you please help with below code. #FINALTable is the target table that needs appends/updates from #SourceTable(which is a daily refresh from feed). here the MID, MName, MDOB is compbined data key / composite key so if the combination of three columns exist in Target then if there is any values between source […] |
SQL Server 2016 - Administration |
Sql error log? - We have job which is configured to recycle the sql error log on daily basis and its failing with the error DBCC execution completed. If DBCC printed error messages, contact your system administrator. [SQLSTATE 01000] (Message 2528) SQLServerAgent Error: 32. [SQLSTATE 42000] (Error 22022). The step failed. we renamed the sql error log out file […] |
Administration - SQL Server 2014 |
SQL maintenance The package execution returned DTSER_FAILURE (1) - Hello, So we just came across this error message, and the error message is: Executing query "declare @backupSetId as int select @backupSetId =...".: 100% complete End Progress DTExec: The package execution returned DTSER_FAILURE (1). Started: 3:00:00 AM Finished: 3:01:49 AM I looked online, and found this on sql central: DTExec: The package execution returned DTSER_FAILURE […] |
Development - SQL Server 2014 |
Send alert whenever a Field data type value is about to reach its maximum limit - How to setup a monitoring where it throw an alert whenever a field data type value is about to reach its maximum limit. |
Query to Get Differences in Table Sizes - Dear Group: We get a daily push from other systems into our SQL Server for us to do reporting against. Over the last couple weeks, we have noticed that these pushes are not consistent, in that sometimes a few tables are empty, and other times, the record counts are significantly off from what is normally […] |
SQL 2012 - General |
hotfix for tsl1.2 ? - hello, what hotfix do i need for the following version to enable tsl1.2? Or can someone tell me where I could look there? Thanks in advance. With kind regards Joe |
SQL Server 2012 - T-SQL |
Query never completes on HAG primary replica but runs in seconds on Secondary - Hello everyone, We have a HAG with 3 nodes. A query that normally runs in seconds on the primary replica (SRV1) is taking a very long time to return partial results since yesterday; I have not seen it complete since as I have to kill it before users scream. The same query runs in a […] |
MERGE statement with MATCH based on multiple fields - I have a MERGE stored procedure that I need to modify to check for the MATCH based on five fields below... Is this possible? Below I have it simply checking the Call_ID field: CREATE PROCEDURE [dbo].[ComToA2WH] AS BEGIN MERGE a2wh.dbo.CallLogCommon_dbc AS TARGET USING F905.dbo.stgCallLogCommon_dbc AS SOURCE ON (TARGET.[CALL_ID] = SOURCE.[CALL_ID]) WHEN MATCHED THEN UPDATE SET […] |
SQL Server 2019 - Administration |
DtExec.exe does not work - I have SQL server 2019 installed on a server, and I would like to run the dtexec.exe, I cannot find anywhere in the start menu, so I go to this path: D:\Program Files\Microsoft SQL Server\150\DTS\Binn and find the dtExec.exe, when I click and tried to run it, it shows the black screen of command window […] |
SQL Server 2019 - Development |
Set Cache Size of Sequence - Hi, I've got the following version of SQL Server installed. Microsoft SQL Server 2016 (SP2-CU16) - 13.0.5882.1 (X64) Jan 25 2021 21:40:32 Copyright (c) Microsoft Corporation Developer Edition (64-bit) on Windows Server 2016 Standard 10.0 (Build 14393: ) I've been reading about creating sequences in SQL Server. However, can't find much material on what […] |
Recursive CTE - Hi everyone, I am working with a recursive CTE that loops through records. I have lead and lag variables the issue is that my lag variables need to look back the number of steps the loop is in. I have the lag working fine but the lead works inversely to the lag. So when the […] |
SQL Azure - Administration |
Bacpac Error - I'm trying to export/import the data with Bacpac. My source database is on Azure SQL MI and target db is Onprem (SQL 2017 version). Export data tier works fine, when I try to import, it runs for a while and then fails with below error. Can anyone help me with this. Warning SQL72012: The object […] |
Powershell |
create html email - I have a MSSql table that I would like to create an HTML email with totals. The SQL table has 4 fields GroupName,Dept,Desc and ExpAmt. The GroupName would be the high Level then break on Desc and dept within the Desc. GroupName Dept Desc ExpAMt XZB […] |
Integration Services |
Text Was Truncated or One or More Characters Has No Match in the Target Code Pag - For the life of me, I cannot seem to get past the following error: Error: 0xC020901C at Import Data - APA, APA Workbook [2]: There was an error with APA Workbook.Outputs[Excel Source Output].Columns[Just] on APA Workbook.Outputs[Excel Source Output]. The column status returned was: "Text was truncated or one or more characters had no match in […] |
| |
©2019 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved. webmaster@sqlservercentral.com |