Here's a few of the new posts today on the forums. To see more, visit the forums.
|
SQL Server 2017 - Administration |
Distributor database in publisher in ALWAYSON setup - Hi. SQL Version 2017 . I have one existing ALWAYSON AG setup. I want to setup transactional replication On top of AG, Does Distributor database can able to configure and choose primary, secondary replica nodes while configure distributor role? please suggest. Or Remote distributor choose? Thanks |
SQL Server 2016 - Administration |
Troubleshooting TCP Provider: Error code 0x274C - Hello experts, I'm trying to help troubleshoot an issue affecting the connections between one of our Linux application servers and one of SQL 2016 servers. Source OS/Driver: Red Hat Enterprise Linux 7 (64-bit) ODBC Driver 11 for SQL Server Destination OS/SQL: Windows Server 2016 Standard Microsoft SQL Server 2016 (SP3-CU1-GDR) (KB5021128) - 13.0.7024.30 (X64) The […] |
SQL Server 2016 - Development and T-SQL |
Need to append 2 columns - Hi. Sorry for my original post not being clear. I think I am providing everything needed and I am clear now. This code uses the table ClientVisit and I'm including the create table for ClientVisit go WITH latest_visits AS ( SELECT client_id, MAX(timein) AS latest_visit_date FROM ClientVisit GROUP BY client_id ), latest_primary_visits AS ( SELECT […] |
Issue Extracting 2nd Level Node Data from JSON File - Hi all, I'm venturing into the world of JSON and am currently trying to extract data out of and into SQL. Here's the problem, I cannot seem to get data out of the 2nd node in the example below. There is a related_resources and resource_type node that sit under the notes node. It will not […] |
Islands (no gaps) - Problem solved but could this be done better? - I've obfuscated my data, but this is legitimately the way the data in my table is distributed. A "User" can have different tiers. They may belong to one for a while, get bumped up, then get bumped down. I need the start and end for each tier the user has been in. They might go […] |
SQL Server 2019 - Administration |
Index and Statistics Maintenance - What are some best practices for maintaining indexes and statistics in SQL Server 2019? I want to ensure that my indexes and statistics are optimized on a regular basis. Are there any specific techniques or tools that are recommended? Any tips or resources would be greatly appreciated! |
Troubleshooting slow running query - I have a process that uses 2 tables in PROD and it has been running slow in PROD. The tables are identical in UAT and the process runs much faster in UAT. What is the best way to tackle this....I was thinking of using Extended Events to capture the details. Is this the best approach? […] |
How to resolve Login differences between Primary and Secondary cluster nodes - I'm a bit rusty with SQL clustering so please bear with me, thanks. I have a 2-server availabilty group. The other day it failed over during a patching reboot, and a Linked Server connection no longer worked while it was failed over to secondary. Initiating a manual failover back to the original primary resolved the […] |
SQL Server 2019 - Development |
Replace function not working - Hi I have some data which is logging web errors. It returns data that looks similar to this... Array ( [error] => Quote not found [module] => api [detail] => 10038 ) I need to replace the Array ( [error] => with an empty string. So the end result looks like... Quote not found [module] […] |
SELECT ROWS ON TIME CRITERIA - Hi, I would like to retrieve only the rows after 23:59:59 but I am getting the output as shown in the picture. Please advise how to write a correct where clause SELECT ID, STARTDATE, STARTTIME, ENDTIME FROM MACHINELOG WHERE (STARTTIME > CAST('00:00:00' as time(0)) AND ENDTIME < CAST('09:00:00' as time)) ORDER BY ID DESC |
SELECT ROWS ON TIME CRITERIA - Hi, I would like to retrieve only the rows after 23:59:59 but I am getting the output as shown in the picture. Please advise how to write a correct where clause SELECT ID, STARTDATE, STARTTIME, ENDTIME FROM MACHINELOG WHERE (STARTTIME > CAST('00:00:00' as time(0)) AND ENDTIME < CAST('09:00:00' as time)) ORDER BY ID DESC |
Iterate and assign Query help - Table:SchoolTeacher TeacherName Zip City State ------------ ---- ------ ------ Sam 12345 NJ NewYork Pat 12345 NJ NewYork Peter 12588 Spring MD School: SchoolLocationID Zip City State -------------- ------- ----- ----- 105 12345 NV NewYork 105 12345 NJ NewYork 106 12345 NJ NewYork 107 12588 Spring MD BusinessRule: 1) Match should be done on Zipcodes if […] |
General |
Help with sql statement to sum how many Individual Items from KIT Parts - SO I need to sum for each Individual Part that is need each day. You can order Parts individually or in a KIT. For instance a 455-TP kit includes (455-01,455-02,455-05,455-12) So and order might be 2 of a 455-TP and 2 of a 455-02 so for this order I would need 2 each of 455-01,455-05,455-12 […] |
Multiple tables in MySQL - My have three tables (Stores, Item, and StoreInv) and I'm attempting to construct a join that includes all entries from Stores and Items even if no matching records exist in StoreInv. Probably best explained using an example: Table for storage: StoreId ------- Store1 Store2 Store3 Table of contents: ItemId ------- A B C StoreInv table […] |
Strategies and Ideas |
DWH'ing from scratch - Hello, We are looking to build a data warehouse from scratch. I was curious to know if someone might be able to point me in the right direction of a solid certification program for this? |