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
      • Temporary tables
      • External tables
      • Identity columns
      • Default values
      • Sequences
      • Unsupported system features
    • Synapse Analytics to Fabric Warehouse
      • Data types
      • Case sensitivity
      • Named procedure parameters
      • Result set limiting
      • MERGE statements
      • Temporary tables
      • External tables
      • Identity columns
      • Default values
      • Materialized views
      • Create table as select (CTAS)
      • Unsupported system features
    • 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
  • Microsoft training - SQL Tran
    • Introduction
    • Licensing plans
    • Deploying and activating
    • Creating a new project
    • Exploring the Overview screen
    • Inside the Workspace screen
    • Code translation and emulations
      • Data type emulation
      • Case sensitivity emulation
      • Named parameters emulation
      • Result set limiting emulation
      • Merge statements emulation
      • Identity column emulation
      • Default values emulation
      • Detection of unsupported features
    • Understanding the Target screen
    • Using the Reports screen
    • Working with the Scratch pad
Powered by GitBook
On this page
  • Code example
  • Training video example
  1. Microsoft training - SQL Tran
  2. Code translation and emulations

Named parameters emulation

PreviousCase sensitivity emulationNextResult set limiting emulation

Last updated 7 days ago

Synapse Analytics supports calling stored procedures using named parameters, allowing arguments to be passed in any order by explicitly specifying parameter names. This improves code readability and flexibility.

However, Microsoft Fabric Warehouse does not support named parameters — it requires procedure calls to use strictly positional arguments that match the declared parameter order exactly.

To bridge this gap, SQL Tran automatically rewrites procedure calls: it analyzes the procedure signatures and transforms named arguments into the correct positional order. If any optional parameters are omitted, SQL Tran inserts NULL placeholders to preserve alignment.

This ensures that procedures originally relying on named parameters will continue to function correctly after migration, eliminating the need for manual adjustments.

(For more information, see the following emulation reference page: )


Code example

Synapse Analytics:

CREATE PROCEDURE dbo.ExampleProcedure
    @PersonID INT,
    @FirstName NVARCHAR(50),
    @Height DECIMAL(5,2) = 0.0,
    @Age INT = NULL
AS
BEGIN
    RETURN;
END
GO

CREATE PROCEDURE dbo.TestNamedParameters
AS
BEGIN
    -- Call with reordered parameters
    EXEC dbo.ExampleProcedure
        @Age = 30,
        @FirstName = 'John',        
        @PersonID = 12345
END;

Fabric Warehouse (generated by SQL Tran):

CREATE PROCEDURE dbo.ExampleProcedure
    @PersonID INT,
    @FirstName NVARCHAR(50),
    @Height DECIMAL(5,2)/* SQLTRAN FIX:  = 0.0 */,
    @Age INT/* SQLTRAN FIX:  = NULL */
AS
BEGIN
    SET @Height = ISNULL(@Height, 0.0);
    SET @Age = ISNULL(@Age, NULL);
    /* SQLTRAN FIX: RETURN; */
END
GO
CREATE PROCEDURE dbo.TestNamedParameters
AS
BEGIN
    -- Call with reordered parameters
    EXEC dbo.ExampleProcedure 12345,
	'John',
	NULL,
	30; /* SQLTRAN FIX: EXEC dbo.ExampleProcedure
        @Age = 30,
        @FirstName = 'John',        
        @PersonID = 12345 */
END;

Training video example

In the example shown, a procedure contains a call to another procedure using named parameters — a feature supported in Synapse but not in Fabric.

SQL Tran automatically transforms this call by replacing the named parameters with correctly ordered positional arguments in the target SQL.

If a parameter is removed from the procedure call in the source SQL (such as omitting the middle argument), SQL Tran maintains positional integrity by inserting a NULL in its place in the target SQL.

This ensures that argument positions remain aligned with the procedure’s expected signature, preserving the intended behavior in Fabric’s stricter environment.

Named procedure parameters
Named parameter emulation in translated SQL