|
|
|
|
|
|
Question of the Day |
Today's question (by Steve Jones - SSC Editor): | |
SQL Server 2019 PMEM | |
For SQL Server 2019 on Linux, what is PMEM? | |
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) |
Counting Occurrences in Python I have some data in a list: friends = ['andy', 'brian', 'sally', 'brian', 'dean', 'tim', 'bertha', 'sarah', 'ann', 'ann', 'brian'] I want to get a count of the number of friends named "brian". How can I do this? Answer: friends.count("brian") Explanation: A list has a method called count(x), which you can use to count occurrences of the parameter, x, in the list. Ref: count() - https://www.w3schools.com/python/ref_list_count.asp |
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 |
Remote Registry service and Get-DbaProductKey - Hello , I have to do an SQL license audit I try to use the command dbatools Get-DbaProductKey except that this command requires starting the Remote Registry service AVERTISSEMENT : [09:59:19][Get-DbaProductKey] Can't access registry for DESKTOP-95KKMMH. Is the Remote Registry service started? AVERTISSEMENT : [09:59:21][Find-DbaInstance] Failed to execute Service Principal Name discovery | Exception lors de l'appel […] |
SQL Server 2017 - Development |
Getting Total Spending/Purchase of Unique Customers against Each Store - TSQL - I have a requirement where purchases (spending) of customers made at different stores are provided in transactions table. It is required that What are the total purchases made at each store. How many unique/distinct customers made purchases at each store. What are the total purchase of those unique customer at all stores. Challenge I am […] |
Grouping Issue for Emails - Greetings, I am trying to organize contact emails based on very specific criteria and would appreciate some guidance. This info is coming from 3 tables and my requirements are: Columns: ContactId, Default email, Default Email type, Second Email, Second Email Type, Third Email, Third Email Type If a contact has 1 email, it populates the […] |
SQL Server 2016 - Development and T-SQL |
Please help to get duration between two 4 or 3 character string - DATEDIFF(minute, CONVERT(varchar,[begin_time],8) , CONVERT(varchar,[end_time],8)) as [duration] this was not worked for me could you please help above 3 formats how to get duration |
Using a SET statement inside of a CASE Statement - I want to update the contents of a variable using a CASE Statement; for example: I declare the variable and set the initial value, then I want to use a CASE Statement to append to that variable contents. So, in my example below, it initially sets the variable to 'The Following Items Have Changed:' . […] |
SQL 2012 - General |
when search on long text on table have 40 milion rows it is very slow so what i - I work on SQL server 2012 I need to search on table partswithcompany that have 40 million rows . when make select SearchParts, CompanyId from partswithcompany where CompanyId=1234 and SearchParts='A5ghf7598fdmlcpghjk' it is very slow to re but it take too much long time when make select data from table or when using where condition is […] |
SQL Server 2012 - T-SQL |
Compare two versions of SQL to limit data within 2 years - Hi, I need to limit my data within 2 years, now I have no version of scripts, but I'm not sure which one is better, especially for the first one, I don't quite understand if it's necessary to prepare the 2nd temp table. hope you can guide me, thanks. V1: with cte_filterdates as ( select top 1 [month] maxdate, dateadd(year, -2, cast(convert (varchar(max), [month])+ '01' as date)) mindate from TableA with(nolock) order by [month] desc ), […] |
SQL Server 2019 - Administration |
opening a database - I am new to SQL. I successfully installed SQL server on a win10 PRO box at home. I connected to a SQL server instance on my home machine. I can create a database and work on it as described here: https://docs.microsoft.com/en-us/sql/ssms/quickstarts/ssms-connect-query-sql-server?view=sql-server-ver15 However, I want to investigate an already created database from another machine at my […] |
Non-Unique Clustered index impact - SQL 2019 Standard, 32 GB, 4Core, Win 2019 vm. We have a table with an INT Identity as PK (non-clustered) A clustered index on a date (non-unique) about 300 rows per day. One column, that is Nvarchar(max) usually contains about 60K per record. We need a covering index that contains the NVARCHAR(MAX) as records are […] |
Slowwwww running queries - We upgrade to SQL 2019 a year back and from the past 2-3 months we are seeing performance issues We have enough of memory and CPU and the perfmon counters look good. Here's some activity on the server/database I captured when I tried to run a query which is taking 2 mins to run usually […] |
SSRS 2014 |
upgrade/migrate from SSRS 2014 to SSRS 2019 - I'm currently running SQL Server 2014 (Enterprise Edition) using SSRS 2014 (Native mode) to create reports for my employer. I am also using Visual Studio 2013 Shell (Integrated) to create my reports. I'm wanting to know if I can upgrade the SSRS 2014 (Native mode) to SSRS 2019 (Native mode) while still keeping my SQL […] |
General |
Python Calculation in Euler Project problem - Ahoi, since i am learning python i am trying to work myself through the "Euler Project" questions. Currently i am stuck because i can't find WHY my solution produces the wrong answer. Obviously there are other solutions and implementations out there but i do not understand why mine does not output the correct solution although […] |
Powershell |
Refresh Power BI Report Server Dataset with Powershell and SQL Agent - Hi, I have had the below script running for approx 12 months and after a power BI Upgrade on Friday last, it has stopped working. I can manually work around it but it would be nice to get it working again. Current PowerBI Report Server version: Version 1.10.7698.27886 (January 2021). The error is "The remote […] |
Integration Services |
Lookup Match n No Match - I would like to compare two files, that should give me. a Match and No Match output in separite tables. Can somebody send ma screenshot/link of such a ssis package -_----------------- Can somebody tell me, does the following task have to be do difficult? https://drive.google.com/file/d/0ByFnKe4djAO-Y1JPYktEbVBCQTdkM1ZsSG1jY0k3dmRLbDdz/view?usp=drivesdk |
Suggestions |
How to contact a Moderator? - Maybe it is obvious and I have missed it, but I couldn't find a way to contact a moderator (I found the CONTACT US page with email address of Webmaster ... but I am not sure that would be the appropriate route) The reason for my request was because I was trying to QUOTE a message […] |
| |
©2019 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved. webmaster@sqlservercentral.com |