Fixing SQL Server JDBC Connection SSL Certificate Errors

When connecting to a SQL Server database from a Java application using JDBC, you might encounter an SSL/TLS handshake failure. This typically manifests as an error indicating the driver cannot establish a secure connection. The root cause is often that the SQL Server's SSL certificate is not trusted by the Java Virtual Machine (JVM). This can h ...

Posted on Thu, 18 Jun 2026 18:22:21 +0000 by nerya

Using UNION with Recursive CTEs in SQL Server

Recursive Common Table Expressions (CTEs) in SQL Server can be combnied with other queries using the UNION or UNION ALL operators. This is typically done within the recursive CTE definition itself, where the anchor member and the recursive member are joined by a UNION ALL. The final result set of the CTE can then be used in an outer query with ...

Posted on Wed, 17 Jun 2026 18:13:48 +0000 by jacinthe

SQL Server Data Definition Language: Database and Table Creation with Integrity Constraints

Database Creation with File ConfigurationIn SQL Server, the CREATE DATABASE statement allows precise control over database file storage. The following example creates an educational management database with customized settings for both primary data and log files:CREATE DATABASE EduManagementDB ON PRIMARY ( NAME = 'EduData', FILENAME = ' ...

Posted on Sat, 06 Jun 2026 17:37:59 +0000 by bouton

SSRS Report Development Best Practices

Pie Chart Data Label Positioning When working with pie charts in SSRS, data labels are displayed inside the pie segments by default. This can lead to overlapping text and poor readability, especially when dealing with multiple categories. To improve clarity, position data labels outside the pie chart: Open the Properties panel (press F4) ...

Posted on Mon, 18 May 2026 17:42:48 +0000 by lauthiamkok

Decoding SQL Server Execution Plans

When analyzing a graphical execution plan in SQL Server, always remember to read the flow from right to left.Data Retrieval OperationsConsider the following unindexed table containing approximately 140,000 records:CREATE TABLE Staff( EmpID int IDENTITY(1,1) NOT NULL, FullName nvarchar(50) NULL, YearsExperience int NULL, SalaryLe ...

Posted on Mon, 18 May 2026 00:20:31 +0000 by biz0r

Mastering Data Queries in SQL Server: From Basic Selection to Subqueries

Core DQL Operations SQL Server provides powerful data retrieval capabilities through DQL (Data Query Language). This guide covers essential query techniques using a teaching management system database scenario. Database Context The teaching information management system includes four main tables: tblStudents — student information (StudentID, S ...

Posted on Sun, 17 May 2026 23:30:13 +0000 by d99kg

Efficient Pagination and Window Functions in SQL Server

Paginatoin with Separate Count Query When implementing pagination in SQL Server, one common approach is to execute two separate queries—one to retrieve the total record count and another to fetch the actual data page. -- Retrieve total number of matching records SELECT COUNT(*) AS TotalRecords FROM Products WHERE CategoryId = 5 AND IsActive = 1 ...

Posted on Sun, 17 May 2026 03:50:15 +0000 by Code_guy

Batch Processing Excel Files and Importing Data into SQL Server with Python

Requirements Analysis Excel data porcessing typically involves: Converting Excel serial date numbers to standard date formats (e.g., 44567 → 2022/1/6) Removing duplicates based on order IDs (SOID), keeping only the most recent records by date Converting date strings with English month names to numeric formats (e.g., 06/Jan/2022 12:27 → 2022-1- ...

Posted on Fri, 08 May 2026 09:32:27 +0000 by m2babaey