Here's a few of the new posts today on the forums. To see more, visit the forums. |
SQL Server 2017 - Administration |
Manual Distribution Database Cleanup - Hi All. I have a reasonably straightforward transactional replication setup. I had two databases on Server a, that are replicated to server b for reporting purposes. All was going well until Halloween (yeah, I know) when one of the databases encountered file corruption. The database remained running but the backups failed, it truly was my […] |
SQL Server 2016 - Development and T-SQL |
SQL server help (converting rows to columns) - I am using the following sql to convert rows into columns for each pid, intdate. This works fine when f1,intdate and docdate are not changed. So with the following sample data, I get 2 rows. INSERT INTO #Data (pid,f1,mne,mneval,intdate,docdate) VALUES ('u1','11','Q1', '1','01/01/2000','01/01/2000 10:30'), ('u1','11','Q2', 'Y','01/01/2000','01/01/2000 10:30'), ('u1','11','Q3', 'N','01/01/2000','01/01/2000 10:30'), ('u1','11','Q4', '2','01/01/2000','01/01/2000 10:30'), ('u1','11','Q5', '3','01/01/2000','01/01/2000 10:30'), […] |
SQL Server 2012 - T-SQL |
Fill in missing hours for each VisitID during the day - create table #T ( VisitID varchar(30), ER_Date date, HR int ) insert into #T(VisitID, ER_Date, HR) values('F3-B20241031192313800','11/1/2024',0) insert into #T(VisitID, ER_Date, HR) values('F2-B20241031155610449','11/1/2024',0) insert into #T(VisitID, ER_Date, HR) values('F3-B20241031181839474','11/1/2024',0) insert into #T(VisitID, ER_Date, HR) values('F2-B20241031183744823','11/1/2024',0) insert into #T(VisitID, ER_Date, HR) values('F2-B20241031215711573','11/1/2024',0) insert into #T(VisitID, ER_Date, HR) values('F3-B20241031164745365','11/1/2024',0) insert into #T(VisitID, ER_Date, HR) values('F2-B20241031214614352','11/1/2024',0) insert into […] |
SQL Server 2019 - Administration |
Query Network Protocols from T-SQL or PowerShell - Hello experts, I want to be more organized about the SSL certificates we have bound to SQL Servers. Is there a way to use T-SQL or PowerShell to retrieve that information, especially the cert name and expiration date? If I can gather such info in a table, I can sort it and predict when to […] |
Occasional Sql Server 2019 slowness (upgraded from 2014) -- please help... - Hi everyone, We recently upgraded our server to Sql Server 2019 (15.0.2125.1 (X64) on Windows Server 2019 Standard 10.0) from the previous Sql Server 2014. The server has 32GB of RAM with an 8- Core 2.10 GHz Intel Xeon chipset. We have noticed periods of slowness in processing from time-to-time which we rarely experienced with […] |
DBATools in a agent job - Hi Dbatools is used to copy table data from domain a to domain b (Copy-DbadbTableData). The job step uses a proxy account. There is a trust between domains and the credential used for the proxy has access to sql instance in domain b and the permissions are correct. The script fails with "The certificate chain […] |
SQL Server 2019 - Development |
Linking 2 SQL Databases - Hi All I am a complete novice so I apologise for any incorrect terminology. What I am trying to do is link 2 systems running different Security Access Control software's from different vendors both using SQL as the data pool. Ultimately what the end goal looks like is system A is the front end and […] |
How to write this query? - Hi everyone I have two tables storing stock prices. Each table comes from a different source so there are slight differences between them at times. I need to know what those differences are. I started the query and it works if I look at the results separately. I am looking at combining the results so […] |
ssrs order of operation question - hi i need "sample size" in my report's 4th data region which is a grid with 2 additional full grid with comments. It is shown in the image. i want to add a 3rd additional comment row to the same tablix . I want its visibility to depend on "sample size" being less than 10. […] |
Error converting data type varchar to numeric - issue resolved. |
SQL Azure - Development |
Database copy for report work load - Hi Team, I am looking for a an help, Please see my problem below. I have a Azure MI. I would like to create a replica of two production databases of size 200GB, 40GB respectively to another MI in the same region, and it is to be used for reporting workload. I would like to […] |
Reporting Services |
Does SSRS Report with Stored Procedure execute SQL string? - I declare @Where based on the input parameter in the stored procedure. Set @SQL = 'Select * from Table1 ' + @where EXECUTE(@SQL) I created a dataset in SSRS to run the stored procedure. It returned no fields. Does SSRS Report with Stored Procedure execute SQL string? Thanks. |
Powershell |
Pull mssql to Postgres - Does anyone have a script\example that would connect to SQL server instance run a query to gather output then connect to PostGreSql DB and load? I have searched but looking for a script rather than a tool so I can schedule process. Thanks. |
SQL Server 2022 - Administration |
SQL Server Constrained Delegation - Hi, hoping someone can help. We're in the process of migrating to a new SQL instance and bulk load / insert from SMB share isn't working in SMSS or via SQL agent job I'm reasonably confident its Kerberos delegation as I see ANONYMOUS in the file server audit log with constrained delegation and when I […] |
SQL Server 2022 - Development |
Get Sum and Last month sum - I want to get the sum and I want to get the sum of only last month for VenNum by FiYr and DocDte. I am having trouble adding the sum of only the previous month. Select count(*) as cnt, T1.FiYr, T1.DocDte, T1.VenNum, Sum(T1.DocCurrAmt) as DocCurrAmt From WalgreensCnlySapPaidHistory.[dbo].[CnlySapRawPaidHistory] T1 Where DocTypeDesc Like '%Scan Base%' and T1.VenNum […] |