SQL Tran Docs
  • Overview
    • About
    • Getting started
    • Object lifecycle
    • Why is there no AI inside?
    • Performance considerations
    • Security considerations
    • Assessment
    • Unlocking projects
    • Interface walk-through
    • Translation scenarios
    • Prerequisites for Azure Marketplace deployment
  • Emulation Scenarios
    • Emulation in SQL Tran
    • SQL Server to Fabric Warehouse
      • Data types
      • Case sensitivity
      • Cursors
        • Basic cursor loop
        • Cursor types
        • Fetch direction modes
        • Cursors in control flow
        • Nested cursors
        • Data modification cursors
        • Multiple cursors
        • Subqueries and filtering
      • Named procedure parameters
      • Result set limiting
      • MERGE statements
      • Computed columns
      • External tables
      • Materialized views
      • Identity columns
      • Unsupported system objects
    • Synapse Analytics to Fabric Warehouse
      • Emulations
      • Limitations
    • SQL Server to Synapse Analytics
    • Oracle to PostgreSQL
  • Project wizard
    • Source database
    • Target database
    • Wrapping up
  • Projects
    • Project list
    • Overview
    • Workspace
    • Reports
    • Tests
    • Scratch pad
    • Settings
      • Project name
      • Mapping
      • Database connections
    • Navigation
    • Object complexity
    • Static analysis
    • Translation errors
    • Exporting and importing projects
  • Workspace
    • Object tree
    • Data lineage
    • Code
    • Actions
      • Overriding source
      • Overriding target
      • Ignoring objects
  • Tests
    • Workflow
    • Configure SQL Tran
    • Connecting to databases
      • Fabric Warehouse
      • Synapse Dedicated SQL Pool
      • Azure SQL Database, Azure SQL Managed Instance, Microsoft SQL Server
    • Tables
    • Views
    • Procedures
    • Functions
    • Triggers
    • Performance tests
  • Scripter
    • About
    • Supported databases
    • SQL Server
    • Azure SQL
    • Synapse Dedicated Pool
    • Oracle
    • PostgreSQL
    • MySQL
Powered by GitBook
On this page
  • Emulation context
  • Emulation strategy
  • Code example
  • Important notes
  1. Emulation Scenarios
  2. SQL Server to Fabric Warehouse

Case sensitivity

Emulation context

SQL Server is typically configured to use case-insensitive collation, meaning object names like Customers, customers, and CUSTOMERS are treated as equivalent.

In contrast, Microsoft Fabric Warehouse is case-sensitive by default. It treats differently cased identifiers as entirely separate objects. This affects table names, column names, procedure names, aliases, and other database objects.

This difference can lead to runtime errors in Fabric if casing is inconsistent across declarations and references. In larger databases, this inconsistency often goes unnoticed in SQL Server but will cause failures in Fabric unless explicitly corrected.


Emulation strategy

SQL Tran automatically rewrites object and identifier references to ensure consistent casing across all usage points, while conforming to Fabric’s case sensitivity rules where required.

It normalizes references to match the casing used in the original object definitions, ensuring that object names are applied consistently throughout the codebase.

This is done through static analysis of the SQL structure, allowing SQL Tran to accurately resolve and adjust identifier usage. As part of this process:

  • Table and column references are rewritten to match their declared casing.

  • Alias declarations and their usages are rewritten to lowercase to align with Fabric conventions.

  • Schema names, object prefixes, and other identifiers are adjusted as needed.

  • Casing is preserved in comments and string literals.

This automatic adjustment ensures that code written under SQL Server’s case-insensitive model will run reliably in Fabric’s case-sensitive environment, without requiring manual intervention.


Code example

SQL Server:

CREATE TABLE Customers (
    CustomerID INT,
    Name NVARCHAR(100)
);
GO

SELECT
    c.customerid,
    C.NAME
FROM
    cusTOMers AS C;

Fabric Warehouse (generated by SQL Tran):

CREATE TABLE Customers (
    CustomerID INT,
    Name VARCHAR(200) /* SQLTRAN FIX: NVARCHAR(100) */
);

GO
SELECT
    c.CustomerID /* SQLTRAN FIX: c.customerid */,
    c.Name /* SQLTRAN FIX: C.NAME */
FROM
    Customers /* SQLTRAN FIX: cusTOMers */ AS c /* SQLTRAN FIX: C */;

Important notes

  • SQL Tran does not apply arbitrary casing conventions. It reflects the casing used in original object declarations and rewrites aliases to lowercase to comply with Fabric conventions.

  • Inconsistently cased references are not simply normalized. They are made explicitly compatible with Fabric’s strict case sensitivity rules.

  • This emulation does not affect string comparisons (e.g., WHERE Name = 'john'). Such comparisons depend on collation and may require separate handling.

PreviousData typesNextCursors

Last updated 5 days ago

Case sensitivity emulation in SQL Tran