Here's a few of the new posts today on the forums. To see more, visit the forums. |
SQL Server 2017 - Development |
Job is empty SQL - Hi guys, I really do not understand why I still receive empty emails. Please check my code: EXEC msdb.dbo.sp_send_dbmail @profile_name = '#####' , @recipients = 'a###' , @subject = 'queryresultset' , @body= 'test tes tesl' , @execute_query_database = 'dbo.rates' The mail I get is: |
SQL Server 2016 - Administration |
External process holding the log and SQL give 'Unable to cycle error log'... - Hello We have a servers with the following issue Msg 17049, Level 16, State 1, Procedure sp_cycle_errorlog, Line 9 Unable to cycle error log file from 'D:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\Log\ERRORLOG.98' to 'D:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\Log\ERRORLOG.99' due to OS error '5(Access is denied.)'. A process outside of SQL Server may be preventing SQL Server from reading […] |
Development - SQL Server 2014 |
T SQL to build complicated time series data - I have a database full of financial time series data like Symbol, Date, Price, Volume AAPL, 05/25/2020,150.10, 546285467 AAPL, 05/26/2020,153.34, 465055454 MSFT, 05/25/2020,100.10, 746285467 MSFT, 05/26/2020,103.34, 865055454 GOLD, 05/25/2020,2000.10, 450285467 GOLD 05/26/2020,20010.50, 350055454 etc Many symbols. Lets say I had an INPUT BOX on a client asp.net form that said this. ((Symbol1 - Symbol2)/1000)*Symbol3 The […] |
SQL 2012 - General |
Install issue on new machine - Hello I am having an issue install SQL Express 2012 on a new PC. I am getting an error about Cannot use file 'master.mdf' because it was originally formatted with sector size 4096 and is now on a volume with sector size 16384. Is there a work around for this? |
Azure SQL backup policy strategies and best practices? - What are best practices for setting up long term retention for an Azure SQL DB? Are there any common strategies to keep the costs low? How should one go about implementing it for keeping 10 year backups. When I select weekly snapshots for 10 years, the cost is going through the roof (3.5x the cost […] |
SQL Server 2012 - T-SQL |
Problem understanding SUM function with GROUP BY - I have code I'm trying to write to sum the time in decimal for each user_name: SELECT [user_name], dbo.fnGetDecimalTime([event_sec]) as 'Decimal_Time', SUM(dbo.fnGetDecimalTime([event_sec])) as 'Decimal_Time_SUM' FROM [Charter].[dbo].[ConvoHrs] group by [user_name], [event_sec] order by [user_name], [event_sec] desc But my data comes back looking like this: user_name Decimal_Time Decimal_Time_SUM (b) Alexander Pierson 2.00 2.00 (b) Alexander Pierson […] |
Problem understanding SUM function with GROUP BY - I have code I'm trying to write to sum the time in decimal for each user_name: SELECT [user_name], dbo.fnGetDecimalTime([event_sec]) as 'Decimal_Time', SUM(dbo.fnGetDecimalTime([event_sec])) as 'Decimal_Time_SUM' FROM [Charter].[dbo].[ConvoHrs] group by [user_name], [event_sec] order by [user_name], [event_sec] desc But my data comes back looking like this: |
SQL Server 2019 - Development |
Split a given number in Percentages and round to integer - Hi ,I would like to split a given number into 3 numbers based on a percentage(98.6% , 1.2% and 0.2%) and round it to an integer value and the sum of 3 numbers should equal to the given number For example a given number is 300 or 120, for the given number 300, I would […] |
PowerShell Script output - I have a power shell sql script that works as I desire except the top line of the excel (csv file it creates) is not desired. The csv file created is used as a source file for another system - I need to eliminate the Power Shell Dialogue in first row Here's the script: # […] |
Issue with Case statement - i have a table where i have mix and match records under statement column. i am trying to filter based on case statement.. but unavailable to figure out how to keep declare logic when condition is met. IINSERT INTO [dbo].[At] [statement]) Select CASE WHEN Statement like '%from%' AND Statement like '%Where%' AND Statement not like […] |
Extracting out elements from XML String based on condition in tag - Hi there I am trying to the Channel list from a particular XML file in lines 868 - 872 (Instrumental Channel List) Now i tried the following DECLARE @DataSheetXML XML -- Extract Datasheet, so that Probe Definition and Channel List can be extractted SELECT @DataSheetXML = DataSheetXML from [#DeviceMasterList] SELECT pd.a.value('let $a := . return […] |
General Cloud Computing Questions |
Recommended course with lab for Kubernetes CKA cert - Im a DevOps and cloud engineer and want to learn kubernetes because most opportunities that I come across are requiring experience with it. I know linux and have a solid and useful understanding of containers. Moreover, I have experience with Docker, bash, Python and Powershell. That said, I'm more of a hands on learner but […] |
Reporting Services |
Remove Extra Print Dialog Box 2016? - In SSRS 2016, microsoft added a "feature" where a dialog creates a printer friendly PDF version of a report; which then sends that version to your normal windows printer.. and on top of that if you have a PDF reader installed it also pops up another window for you to preview it.. I'm not sure […] |
Dynamic Parameter-Defaultvalues not working when using custom assemblys - Hi Everyone, My Reports are using Assemblies, for translation and for some Navigation-tasks. I’ve declared them in ‘References’ and create instances of them via Code. For that I’m using a Parameter @Languagecode to set the Target-Language. That all works perfectly, and here is my Code for that: Public Translation As Resources.ResourceProvider Protected Overrides Sub OnInit() […] |
Powershell |
List file shares from TAR file - How can I list just the directories from a TAR file, then extract just 1 file share from that TAR file. Thanks. |