Problems displaying this newsletter? View online.
SQL Server Central
Featured Contents
Question of the Day
The Voice of the DBA

Daily Coping Tip

Stop for a minute today and smile while you remember a happy moment in 2020

I also have a thread at SQLServerCentral dealing with coping mechanisms and resources. Feel free to participate.

For many of you out there working in a new way, I'm including a thought of the day on how to cope in this challenging time from The Action for Happiness Coping Calendar. My items will be on my blog, feel free to share yours.

 

 

Merry Christmas 2020

Merry Christmas today. Happy Holidays to all of you, for whichever holiday you celebrate this time of year.

It's been a long, hard year, but I hope you are healthy and happy as we close out 2020. Hopefully next year is more enjoyable for all of us.

Steve Jones - SSC Editor

Join the debate, and respond to today's editorial on the forums

 
 Featured Contents

Azure DWH part 14: PolyBase to access to Non relational data

Daniel Calbimonte from SQLServerCentral.com

In this article, we will learn how to work with PolyBase using Azure SQL DWH.

Stored Procedure in SQL Server with R Code

Additional Articles from Redgate

In this article we will explore how to create custom stored procedures using R which is basically an R function that can be called from a SQL Server stored procedure.

From the SQL Server Central Blogs - No Scalars with JSON_QUERY–#SQLNewBlogger

Steve Jones - SSC Editor from The Voice of the DBA

Another post for me that is simple and hopefully serves as an example for people trying to get blogging as #SQLNewBloggers. I started to dig into JSON queries recently,...

From the SQL Server Central Blogs - T-SQL Tuesday #121: Gifts received for this year Redux 2020

Tracy Boggiano from Database Superhero’s Blog

At the end of 2019, Mala (b|t) invited us to write about the gifts we’ve gotten during the year.  I’ve decided to try to make this yearly habit.  This year...

 

 Question of the Day

Today's question (by Steve Jones - SSC Editor):

 

Christmas Fun 2020

Which Christmas character best exemplifies the year 2020?

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)

Merry Christmas 2020

I have a list of songs in a table. I've written a program to retrieve a song from my table and then play it on my Raspberry Pi jukebox. Which of these queries will give me a new random song with each connection from the jukebox?

Answer: SELECT TOP 1 SongName FROM dbo.Song ORDER BY NEWID()

Explanation: Ordering by NEWID() will give you a different result each time. Ref:

Discuss this question and answer on the forums

 

 

 

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
insert data from Form into two different tables - I have a form with fields to fill : NAME_POSTE, NamePrinter, PathPrinter for example: NAME_POSTE: poste1 NamePrinter: name imp 1 PathPrinter: path 1 when adding these values, I want to insert it into two différents tables: CREATE TABLE Postes ( PK_POSTE int NOT NULL PRIMARY KEY ,NAME_POSTE varchar(20) NOT NULL ); CREATE TABLE Params_Poste ( […]
SQL Server 2016 - Development and T-SQL
Pulling stats for multiple columns out of a table efficiently - Dear Experts I have a table that accumulates daily stats, defined so: CREATE TABLE [dbo].[Stats2]        ([StatsDate] [datetime] PRIMARY KEY,        [TypeA_Calls] [int] NULL,        [TypeB_Calls] [int] NULL,        [TypeC_Calls] [int] NULL); I need a SELECT statement, or sequence of statements, which can pull out the earliest and latest date on which each stat is […]
Administration - SQL Server 2014
SQL performance on couple queries are better on older compatibility - Hello, So i have a SQL server 2014, SP3, with 256 gigs of memory, 32 cores, windows 2012 R2 i faced this issue the other day, when the database was on Compatibility level 2014 (120), the query was performing poor, like it would never return. HOWEVER, when i switched it from from Compatibility level 2014 […]
SQL 2012 - General
How to use Cursor to Execute stored procedure where featurevalue is bigger than - How to use Cursor to Execute stored procedure where featurevalue is bigger than 0 ? I work on SQL server 2012 . I face issue I can't use cursor to execute stored procedure when feature value is bigger than 0 . I have stored procedure must execute with every line where feature value is bigger […]
How to get zplid that have zfeature key value on all rows? - Exactly I need zplid and codetypeid that have feature value on all rows . if I have Null on zfeature key on one row then I don't Need it . I need to get zplid that have features Not Null on all rows as zplid 9714 but 9823,5890 have Null so I don't Need it […]
How to delete Max PartDetailsId for Reapeated parts Based on CompanyId and PartI -   I work on SQL server 2012 . I face issue I can't delete max PartDetailsId from part details based on part ID and company id that related to main table parts . if Part ID repeated on partdetails then I get max PartDetailsId by companyid and partid as Part ID 1222 and 1901 and […]
SQL Server 2019 - Administration
SQL command returning - - Hi All, I run a online game, and sometimes a player will have neg stats. This is now causing neg score for neg stats. I would like to cap this at 0 if the stat is neg, but im not sure where I am going wrong. This is what I have so far. update #p […]
column has a single quotation causing error - Hello, while trying to insert records to a table making joins between several tables, its found that one column has such entry with a single quote (for e.g, Record'ng date is on Feb 2010 t0 -678659x). Can I either use quotename() function or do you suggest some escape function in order to load the data? […]
SQL Server 2019 - Development
Join 2 sum cases - Hi Guys, Can someone help me with the below.  I need to joins the below two so that I only have one column. I'm struggling how to get there. SUM(CASE RepairCodes.[Service] WHEN 'Y' THEN 1 ELSE 0 END) AS SERVICE ,SUM(CASE ServCode WHEN 'MST' THEN 1 WHEN 'S&M' THEN 1 ELSE 0 END) AS SERVICE […]
How to use the column name alias from a case statement to a join statement - Hello While trying to use the case alias column in the join statement, getting the invalid column error. Error msg: Invalid column name 'ST100'. SELECT TOP (1000) CASE WHEN [Sx].ac_No IN ( 'ARC' ,'GFT' ,'DHG' ,'STF' ,'FRX' ) THEN '45010' ELSE CD.Idea END AS [ST100] FROM CONSUL AS CD LEFT JOIN table2 AS [Sx] ON […]
Reporting Services
Error: Sub report could not be shown - Hi Guys, I am so stuck, and have been for several days now. I am running SQL Server 2014, 2014.0120.6372.01 I have a report which has many sub reports within, the sub reports are all the same report but I pass in a different parameter for each one. Sub Report 1 = Parameters!BusinessArea.Value(0) Sub Report […]
Reporting Services 2008/R2 Administration
SQL services stops not accepting connection - SQL 2008 R2 service pack1 SQL server not accepting connection error in event log A timeout (30000 milliseconds) was reached while waiting for a transaction response from the MSSQLSERVER service. error in sql server errorlog Using 'dbghelp.dll' version '4.0.5' **Dump thread - spid = 0, EC = 0x0000000000000000 * BEGIN STACK DUMP: * A fatal […]
Integration Services
SSIS ForEach Loop Container for XML Files with mixed content - Hello, (can't upload images into body, neither .png or .jpg, size is less then 1024KB) My goal is to read data from XML files into SQL table. The main issue is that those XML files have mixed content that is not supported through XML Source. To overcome this issue i used XML Task with XSLT […]
Anyone using Kingswaysoft ETL integration components? - We're using their SharePoint integration toolkit. We only have a few jobs and have it installed on a single prod server. I was told we could get trial licenses for testing as needed. I'm getting pushback now on getting a trial license so I can test the new version of their toolkit. They are suggesting […]
Article Discussions by Author
Download SQL Patch Info - Comments posted to this topic are about the item Download SQL Patch Info, which is is not currently available on the site.
 

 

RSS FeedTwitter

This email has been sent to {email}. To be removed from this list, please click here. If you have any problems leaving the list, please contact the webmaster@sqlservercentral.com. This newsletter was sent to you because you signed up at SQLServerCentral.com.
©2019 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved.
webmaster@sqlservercentral.com

 

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -