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 |
%% Breakdown - I have a query that calculates revenue by Region per month, per year. So, the end result should look something like: Region Year Month Revenue --------------------------------- Europe 2021 01 20% Europe 2021 02 21% Americas 2021 01 80% Americas 2021 02 79% The last column is produced by: ,CONCAT( CAST(ROUND(Revenue/SUM(Revenue) OVER(),4)*100 AS DECIMAL (19,2)) , […] |
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 |
SQL 2012 - General |
How to write query generate unique Id for concate both columns search parts and - I work on sql server 2012 . I face issue I can't generate unique Id from merge or concave both columns Search Parts and Company ID and generated Id must be on column Generated ID to be easier and fast on search so Please How to generate unique Id from both column Search Parts and […] |
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 […] |
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 |
SSIS Installation for Visual Studio - Dear Group: I have two versions of Visual Studio installed: VS 2015 and VS 2017 on two different machines. As such, my question is two fold as each has an issue. VS 2015: I am able to create SSIS packages in VS 2015 and I am trying to build a package that works with Excel […] |
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 […] |